![]() |
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 |
| Need your Help on Unix Shell Scripting......... | vinayraj | UNIX for Advanced & Expert Users | 5 | 02-08-2008 07:00 AM |
| Unix Shell Scripting | premamadhuri | Shell Programming and Scripting | 4 | 11-05-2007 03:31 AM |
| Shell Scripting (Unix) | tt1ect | Shell Programming and Scripting | 3 | 04-15-2007 09:15 AM |
| difference between AIX shell scripting and Unix shell scripting. | haroonec | Shell Programming and Scripting | 2 | 04-12-2006 08:12 AM |
| Unix shell scripting | la_burton | UNIX for Dummies Questions & Answers | 6 | 10-22-2004 11:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Use of index in UNIX shell scripting
I have following line of code with me in one of the shell script.
LIST=`awk -v SRV=$SRV -v GRP=$GRP -v ID=$ID '{ if (index($0, GRP) && index($0, SRV) == 2 ) Can anybody help me in understanding the code ? specifically the bold one |
|
||||
|
It looks like a syntax error. Perhaps you pasted too little, or too much. The index function takes two strings, and returns a positive number indicating where within the first the second occurs, or 0 if it does not occur. if(0) is non-true, whereas any other value is true.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|