#!/bin/bash

UNIX: Loop Through Files In A Directory

by Vivek Gite on July 1, 2010 · 3 comments

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

{ 3 comments }

HowTo: Unix For Loop 1 to 100 Numbers

by Vivek Gite on January 16, 2010 · 0 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?

{ 0 comments }

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?

{ 5 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?

{ 11 comments }