Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bash script parameter passing into command 2

Status
Not open for further replies.

rigstars2

Instructor
Dec 18, 2011
64
0
0
US
I'm calling my script like this: ./processName wws2

below is my syntax, how can I use the argument I'm passing to this command below..doesn't seem to like it being passed in as a parameter? There is a syntax error? Please assist. Thanks!

VAR=`ps -ef | grep apdel | awk '/$1/ {print $10}' | cut -d\/ -f5`

echo $VAR
 
[tt]VAR=`ps -ef | grep apdel | awk [!]"[/!]/$1/[!]"'[/!]{print $10}' | cut -d\/ -f5`[/tt]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top