sr320 / course-fish546-2018

7 stars 2 forks source link

creating a bash script #72

Closed Jeremyfishb closed 5 years ago

Jeremyfishb commented 6 years ago

I still don't understand how to save a bash script. If I put a header and some commands like this:

#!/bin/bash set -e set -u set -u pipefail some_command some_file > output_destination

Then what do I need to do to name it and make it save as a bash script?

Also, will it be saved in the directory where I created it? Or do I need to specify where I want it saved?

sr320 commented 6 years ago

It is just a text file, Use your gui text editor to create and save where you would like.

example - https://d.pr/f/O3yTH5

Jeremyfishb commented 6 years ago

I see, I just tried it and copied and pasted the text into gitbash and it worked. But how do you get the text file to end with the .sh suffix?

sr320 commented 6 years ago

see https://d.pr/i/JIL67f