Re: How do you make a .sh file
Basically everything you've ever seen done in a terminal can be included in a shell script. All the terminal is is an interactive script interpreter, just like the Python interpreter. (Well, not exactly, but close enough for this example.)
Basic commands you definitely need to know if you don't already:
Change Directory
cd /path/to/directory -- change the current working directory to somewhere else
cd .. -- move one level up the directory tree
List Contents of a Directory
ls -- list the contents of the current folder
ls /path/to/directory -- list the contents of a specific folder
Create Directory
mkdir /path/to/directory -- create the specified folder
Copy, Move, & Delete Files
cp file1 file2 -- copy file 1 to a new file called file2
mv file1 file2 -- move file1 to file2 (rename the file)
rm file1 -- remove (delete) the specified file
rm -r /path/to/directory -- recusively delete an entire directory and its contents
Those are certainly among the most common commands you're ever going to run into. Obviously there are lots, lots more. If you can tell us what it is you want your scripts to do we may be able to give you more specific advice, and point you in the direction of the appropriate manual pages for the commands you're likely to need.
GCS/O d+(-@) s: a-->? C(++) UL P+ L+++@ E@
W++$ N++ !o K++ w(++) !O M(-) !V PS+(++)
PE-() Y+ PGP++ t++(+++@)* 5++ X++@ R+++@
tv+ b++(+++) DI++ D+ G+ e++>++++ h- r y?
Bookmarks