BASH Shell

Linux / UNIX: Run Commands When You Log Out

by Vivek Gite on November 23, 2010 · 0 comments

I’ve written a Perl script that connects to our central server for me and it allows me feed data so that I make a timesheet later. How do I run my script when I log out from Apple OS X or Linux / UNIX workstation using bash shell?

{ 0 comments }

Linux: Bash Get Time

by Vivek Gite on October 27, 2010 · 1 comment

How do I get the system time in BASH? How can I get the Linux system using bash shell?

{ 1 comment }

Debian Linux Delete Directory Command

by Vivek Gite on August 19, 2010 · 0 comments

I am new to Debian Linux and bash shell command line. How do I delete or remove a directory using bash prompt?

{ 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 Generate Random Numbers

by Vivek Gite on April 27, 2010 · 7 comments

How do I create or generate random numbers (sequence of numbers that lack any pattern), under Bash shell?

{ 7 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 }