• support[@]kurinchilion.com
  • +1 (888) 666-4252

Shell Scripting: Linux variables

Mar 23, 2010 - by kurinchilamp / / Post Comment
Linux variables have the prefix $. Variables that will be useful in shell scripting are listed below. $$ Process ID number of the shell in execution $? Variable indicating Exit status (from the last command that got executed) $* Entire argument string in the command line (excluding script name) $# Number of arguments in the command line (not counting the shell script name) To access arguments passed to a script, following variables are used. $0 Name of the program (with entire path) $1 First argument passed in the command line $2 Second argument passed in the command line $n Nth argument passed in the command line To move or shift to a specified argument in the list of arguments, "shift" command is used. For example, to shift 1 argument just type "shift" or "shift 1" and to shift to the third argument in the list type "shift 2". (more…)
Continue Reading

TECHNOLOGY DEV STACK

Following are some of the technologies that we use to build and maintain solutions for our clients.