![]() |
|
|
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 |
| hOW TO PUT OUTPUT OF TWO ECHO STATEMENT IN ONE LINE | scorp_rahul23 | Shell Programming and Scripting | 3 | 09-22-2008 06:30 AM |
| single line if statement | ankimo | UNIX for Dummies Questions & Answers | 2 | 09-21-2008 07:43 PM |
| grep entire statement not just line | shantanuo | UNIX for Dummies Questions & Answers | 3 | 08-28-2008 01:48 PM |
| Illegal function call | naren_chella | High Level Programming | 6 | 05-25-2006 01:27 AM |
| 2489 Illegal instruction | ana | UNIX for Dummies Questions & Answers | 1 | 01-14-2005 11:11 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Illegal Statement at source line 2
Hello
I'm pretty new to Shell Programming and I'm trying to write a script to display the out of a file displaying licence-use for an application. I've piped the output of my licence-use query to a file. On this file I am trying to run the following awk file, but I keep getting the error: bash-3.00$ nawk -f ~/viewlicences.awk ~/licences nawk: syntax error at source line 2 context is if ($0 /Users of >>> SYNERGY-CMBase/) <<< nawk: illegal statement at source line 2 This is my awk script that I'm trying to run on the file: 1 { 2 if ($0 [/Users of SYNERGY-CMBase/]) 3 { 4 while ("x" == "x") 5 { 6 getline var 7 if (var == "") { continue } 8 if (var != /Users of SYNERGY-GroupSecurity/) { print var } else { exit } 9 } 10 } 11 } I'm basically trying to capture output between the line which which says "Users of SYNERGY-CMBase" and Users of "SYNERGY-GroupSecurity". Any advice would be greatly appreciated. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|