Categories Linux

[Linux] Useful Commands in Shell

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:

#!/bin/bash

to the file. Example:

#!/bin/bash
echo "hello world"

To run it:

sh FILE_NAME.sh
./FILE_NAME.sh

Note: Just enter FILE_NAME.sh is wrong.

More From Author

Leave a Reply

Your email address will not be published. Required fields are marked *