mkdir -p dir/subdir/ #create dir with subdir
touch #create a file
cat #print out content of a file
To make bash script, create a file with extension .sh and add the code:
1 | #!/bin/bash |
to the file. Example:
1 2 | #!/bin/bash echo "hello world" |
To run it:
sh FILE_NAME.sh
./FILE_NAME.sh
Note: Just enter
FILE_NAME.sh
is wrong.