≡ Menu

May 2010

As part of our on-going bash tutorial series, we discussed about bash positional parameters in our previous article. In this article let us discuss about the bash special parameters with few practical shell script examples. Some of the bash special parameters that we will discuss in this article are: $*, $@, $#, $$, $!, $?, [...]

{ 7 comments }

A parameter is an entity that stores values. It can be a name, a number or some special characters. A variable is a parameter denoted by a name. Some variables are set for you already, and most of these cannot have values assigned to them. These variables contain useful information, which can be used by [...]

{ 10 comments }

Question: I would like to terminate my Unix command line shell, when I don’t execute any command for N number of seconds. i.e How to automatically log out if there is no activity in a Linux shell ? Answer: TMOUT variable in bash will terminate the shell if there is no activity for N seconds [...]

{ 6 comments }

When you execute a unix shell-script or command that takes a long time, you can run it as a background job. In this article, let us review how to execute a job in the background, bring a job to the foreground, view all background jobs, and kill a background job. 1. Executing a background job [...]

{ 27 comments }

This article is part of our on-going bash tutorial series. Like any other programming languages, Bash also provides variables. Bash variables provide temporary storage for information that will be needed during the lifespan of the program. Syntax: VARNAME=VALUE Note: There should not be any space around “=” sign in variable assignment. When you use VAR=VALUE, [...]

{ 5 comments }