![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Alias a command | b_garima | UNIX for Advanced & Expert Users | 2 | 10-22-2007 10:06 AM |
| a question about alias command | jayyu317 | UNIX for Dummies Questions & Answers | 1 | 12-11-2006 11:07 PM |
| alias for rm command | shriashishpatil | UNIX for Advanced & Expert Users | 8 | 02-23-2006 08:42 AM |
| AWK embeded PERL | bionicfysh | Shell Programming and Scripting | 7 | 09-23-2003 11:55 AM |
| How to define two variable in foreach command?? | geoquest | Shell Programming and Scripting | 14 | 08-22-2002 06:11 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi all,
I'm trying to define an alias with an embeded awk command: alias kpipe='kill `psme| grep "ifw -r" | grep -v "grep ifw -r"| awk '{print $2}'`' The problem is that the awk command (awk '{print $2}') contains two ' ..' quotes. So bash assumes that the first awk quote corresponds to the end of the alias, but it's not. I want it to process till the last ' . How do I do it ? Any help will be highly appreciated. note: I'm using bash shell. Thanks for you help. |
|
||||
|
Hi all,
Thanks for your suggestions. This one: alias kpipe='kill `psme| grep "ifw -r" | grep -v "grep ifw -r"| awk "{print \\$2}"`' worked perfectly. Regards, Joao. |
| Sponsored Links | ||
|
|