Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2385 of /home/dograus/public_html/dograworld/includes/menu.inc).

unix shell script command line parameters

There are various way we can pass parameters to shell script, here are few tips which can help extract input in shell script or function:

Characters:

^ = starts with

$ = ends with

' ' = single quote, anything inside single quotes is considered as string, absolutely no varialbes

" " = double quotes, anything inside double quotes is string plus it resolve any variables

` ` = backquote or grave, used to execute a command, for example: echo "today is `date` date" or myvar = `date`

 

$> command.sh input1 input2

$0 = name of script, in above case it is command.sh

$1 = value of first input, in above case it is input1

$2 = input2

...

Nike Air Force One Metallic Gold, Nike Air Foamposite One Metallic Gold Black, Nike Air Force One Crib - Boys' Infant Black/metallic Gold http://cialisgeneric20mgbest.com/627-nike-air-force-one-metallic-gold-nike-air-foamposite-one-metallic-gold-black-nike-air-force-one-crib-boys-infant-black-metallic.html
Air Jordan 11 Concord Fake, where Can I Buy Air Jordan 11 Concord, av7007-001 Wears Concord Theme All Year Round Air Jordan Futur http://jordanshoescheap4sale.com/701-Air-Jordan-11-Concord-Fake-Where-Can-I-Buy-Air-Jordan-11-Concord-AV7007-001-Wears-Concord-Theme-all-year-round-Air-Jordan-Futur.html

$n = nth variable

$# = number of input argumets

$* = argumests are double quoted, $* = "input1 input2"

$@ = arguments are individually double quoted $@ = "input1" "input2"

$? = exit status of previous command

$$ = process id of current shell

!ps = execute previous command starts with ps

$! = process id of last background job

 

 

Who's new

  • s10
  • CIIUifBwwC

Who's online

There are currently 0 users online.