5

passing parameter to script, and split the parameter

view full story
linux-howto

http://www.unix.com – i am passing input parameter 'one_two' to the script , the script output should display the result as below one_1two one_2two one_3two Code: if  [ $# -ne 1 ] then echo " Usage : <$0>  <DATABASE> " exit 0 else for DB in 1 2 3 do DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}` done fi ---------- Post updated at 11:06 AM ---------- Previous update was at 11:04 AM ---------- throwing the below error Code: syntax error The source line is 1.  The error context is                 {print (HowTos)