FAQ tagged as:

BASH Shell

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 }

How do convert tabs to spaces in a file using a bash shell?

{ 3 comments }

I‘ve couple of shell aliases defined in ~/.bashrc file. How do I temporarily remove (disable) a shell alias and call the core command directly without using unalias command?

{ 16 comments }

Can you explain me usage of nullglob variable under BASH? How do I check for any *.c files in any directory?

{ 3 comments }

How do I redirect output and errors to /dev/null under bash / sh shell scripting? How do I redirect the output of stderr to stdout, and then redirect this combined output to /dev/null?

{ 4 comments }

Bash Clear DNS Cache

by Vivek Gite · 0 comments

How do I clear DNS cache using BASH shell prompt under UNIX like operating systems?

{ 0 comments }

nixCraft FAQ PDF Collection Now Available To All