≡ Menu

bash script

Bash Script: Find Out In What Directory Script Is Stored Under Unix Or Linux

How can I find out the path of the directory in which my bash shell script is located and store that path in _base variable?
[click to continue…]

Linux / UNIX: Bash Script Sleep or Delay a Specified Amount of Time

How do I pause for 5 seconds or 2 minutes in my bash shell script on a Linux or Unix-like systems?
[click to continue…]

Bash Infinite Loop Examples

How do I write an infinite loop in Bash script under Linux or UNIX like operating systems?
[click to continue…]

HowTo: Bash For While Loop Through File Contents Script

How can I iterate through each line of a text file with Bash for or while loop under Linux or Unix like operating systems?
[click to continue…]

Bash Script: Read One Character At A Time

I need to count one character at a time from input.txt. How do I read one character at a time under Linux / UNIX bash shell script?
[click to continue…]

Bash Read Comma Separated CVS File

How do I read comma separated CVS file under UNIX / Linux / BSD / Mac OS X bash script? My sample file is as follows:

FirstName LastName,DOB,SSN,Telephone,Status

[click to continue…]

Bash Shell Scripting Disable Control-C [ CTRL+C ] Keys

I want to disable Control-C while running shell bash script program under UNIX / Linux like operating systems. How do I disable Control-C?
[click to continue…]

Bash Script Flags

Can you explain me common UNIX / Linux / Mac OS X / BSD bash shell script flags?
[click to continue…]

Bash Append Text To a Variable

How do I append additional text a variable? For e.g., I've a vech set as follows:
I'd like to add (append) "Bus" word to $vevh under UNIX scripting using bash?
[click to continue…]

Linux Bash Script Check File Existence

How do I check if a file called /tmp/foo.txt exists or not using a shell script under Linux operating systems?
[click to continue…]