![]() |
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 |
| Help- Unix File Compare- Struggling | guiguy | UNIX for Advanced & Expert Users | 2 | 01-06-2007 08:32 PM |
| Struggling with a text file | pau | Shell Programming and Scripting | 13 | 05-03-2006 09:47 AM |
| Struggling with mkfifo | alan | UNIX for Dummies Questions & Answers | 20 | 04-20-2004 09:10 PM |
| struggling with addusr ... | Dufty | UNIX for Dummies Questions & Answers | 2 | 01-22-2002 05:00 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
struggling within awk
!#/bin/bash
cat input.sh | awk ' { cur1=tolower($1) cur2=tolower($2) rsh $cur1 report | grep $cur2 # i just want to make the code line to work } ' the error which i get is .... ./madh1.sh: line 1: !#/bin/bash: No such file or directory awk: cmd. line:13: rsh $cur1 report | grep tree | grep $cur2 awk: cmd. line:13: ^ syntax error awk: cmd. line:13: rsh $cur1 report | grep tree | grep $cur2 awk: cmd. line:13: ^ syntax error i'm new to shell scripting & not comfortable with the awk..can you please help me.. thanks in advance, regards, geeko. |
|
||||
|
Quote:
2) to call external commands like rsh, grep etc, you can use system() 3) no need for cat. |
|
||||
|
[QUOTE=ghostdog74;302139726]show your code[/QUOTE
the code is above this post , anyways my code is like thiscat input.txt | awk ' { rsh $1 quota report | grep tree| grep $2 # in the above line i'm not able to do rsh, grep... } the error is ./madh1.sh awk: cmd. line:5: sh $1 quota report | grep tree | grep $2 awk: cmd. line:5: ^ syntax error awk: cmd. line:5: sh $1 quota report | grep tree | grep $2 awk: cmd. line:5: ^ syntax error |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|