≡ Menu


Linux / UNIX: Change Bash To KSH Shell

How do I change my current login shell from bash to ksh under Linux or UNIX or Apple OS X operating systems?
[click to continue…]

UNIX: Loop Through Files In A Directory

How do I loop through files in a directory under UNIX like operating systems?
[click to continue…]

HowTo: Unix For Loop 1 to 100 Numbers

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?
[click to continue…]

/bin/bash: bad interpreter: Text file busy Error and Solution

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

/bin/bash: bad interpreter: Text file busy

How do I fix this error message and run the script?
[click to continue…]

Explain: #!/bin/bash - or #!/bin/bash -- In A Shell Script

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?
[click to continue…]