Open Hjordten opened 1 year ago
Steps to write and execute a script
Open the terminal. Go to the directory where you want to create your script.
Create a file with . sh extension.
Write the script in the file using an editor.
Make the script executable with command chmod +x
The following snippet will run in a linux terminal.
You can copy it, paste into the terminal of the CodeSpace - and it will run. You may have to hit
<ENTER>
to execute the very last command too.But Before you actually run it - try to guess (make your notes in the comments)
[x] What will happen when you run it?
[x] Will it actually work as it is - or do you need to correct anything?
[x] What programming language is this?
[x] Did it actually work as expected - comment on this in the issue.