Bash Shell Programming HowTos

Tutorials, howtos and programming tips about GNU Bourne-Again SHell (BASH) for Apple OS X, Linux, *BSD and Unix like operating systems. ( rss feed )

I know how to find out battery life status using Linux operating system. How do I monitor battery status on a laptop running FreeBSD version 9.x?

{ 0 comments }

How do I use bash auto complete features with various command on CentOS / RHEL / Fedora / Scientific Linux based systems?

{ 3 comments }

I have a man page stored in my home directory called ~/foo.1. How do I read a $HOME/foo.1 man page file? How can I read the file called ~/foo.1 as a manpage with man command?

{ 1 comment }

When I type find . -type d -name "foo" command I get Permission denied error messages. How do I exclude all “permission denied: messages from the find command under Linux or Unix like operating systems?

{ 0 comments }

I have a bash variable as follows:

output="$(awk -F',' '/Name/ {print $9}' input.file)"

How do trim leading and trailing whitespace from bash variable called $output? How do I trim trailing whitespace from $output?

{ 7 comments }

The top and free command display the total amount of free and used physical and swap memory in the server. How do I determine which process is using swap space under Linux operating systems? How do I find out swap space usage of particular process such as memcached?

{ 2 comments }

I have recently rented a dedicated server for my hobby projects and learning CentOS Linux server. I was informed that I am connected to the 100M/s port. How do I test my Internet connection download speed from the console over the ssh session without using HTML5 or Adobe flash/Java applets based websites? How do I test my upload speed from the console?

{ 0 comments }