shell scripting

HowTo Run a Script In Linux

by Vivek Gite on November 10, 2011 · 4 comments

How do I run a Linux shell script? How can I run a script in Linux?

{ 4 comments }

I need to call the function called foo() using echo command in the same statement. How do I all or invoke the function using the echo statement?

{ 1 comment }

Bash String Concatenation

by Vivek Gite on November 18, 2010 · 2 comments

How do I join two strings under BASH? I have two strings stored in two different variables (_p=/delta and _u=aqua) and how do I join this and assign it to another variable in bash?

{ 2 comments }

UNIX / Linux: Deleting Multiple Files In Bulk

by Vivek Gite on November 18, 2010 · 0 comments

How do delete multiple files in bulk (say all *.bak file stored in /netapp/ and its subdirectory) under Linux / UNIX operating systems?

{ 0 comments }

What is the use of UNIX source command under bash or any other shell? How do I use source command under UNIX / OS X / Linux operating systems?

{ 3 comments }

Bash Shell Read a Line Field By Field

by Vivek Gite on March 14, 2010 · 5 comments

How do I read a file field-by-field under UNIX / Linux / BSD Bash shell? My sample input data file is as follows:

device1,deviceType,major,minor,permissions
device2,deviceType,major,minor,permissions

….
..
deviceN,deviceTypeN,major,minor,permissions

For each line I need to construct and execute a shell command as follows:

/path/to/deviceMaker --context=$1 -m $permissions $device2 $deviceType $major $minor

{ 5 comments }

Bash: Continue In a For / While Loop

by Vivek Gite on January 29, 2010 · 0 comments

How do I continue in a for or while loop in Bash under UNIX or Linux operating systems?

{ 0 comments }