![]() |
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 |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep for "exact word" | bullz26 | Shell Programming and Scripting | 7 | 03-14-2008 05:00 AM |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 03:00 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| How to find out the exact year in "Last modified time" using ls command | Dophlinne | UNIX for Dummies Questions & Answers | 6 | 04-11-2006 12:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
can awk built-in "match" be exact??
hello everybody,
as explained in the title, here is what I want: str1="name1 name2 name3" str2="name1" str3="name" I know that match(str1,str2) will return 1, but I want that match(str1,str3) returns 0 (when it also returns 1...) Is there a way to get that exact matching process done in a awk script?? cheers, Tanguy |
|
||||
|
good point otheus...
well by that I mean that I'd like to compare each "field" of str1 (all fields being separated by a coma) and test if they match str3 (exactly). So basically I want to compare name1 to name, then name2 to name, then name3 to name... and check if they are exactly the same (in which case name1 compared to name is a false) hum... not so clear, is it? But maybe I'm simply not doing things the easier way... |
![]() |
| Bookmarks |
| Tags |
| awk match |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|