#!/bin/bash

How do I loop through files in a directory under UNIX like operating systems?

{ 3 comments }

I want to run a Unix command 100 times using a for loop from 1 to 100. Can you tell me how to take a block of numbers in a loop under KSH or BASH shell?

{ 1 comment }

Q. I’m getting an error as follows while trying to run a shell script over remote ssh session:

./myscript.sh
/bin/bash: bad interpreter: Text file busy

How do I fix this error message and run the script?

{ 10 comments }

Q. I know #!/bin/bash is shebang line. But, I noticed a few shell script shebang line ends with a single dash ( #!/bin/bash - ) or double dash ( #!/bin/bash ). Can you explains me purpose of such shebang line?

{ 12 comments }