![]() |
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 Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compare & replace contents within a file | kaustubh137 | Shell Programming and Scripting | 2 | 05-27-2008 06:56 AM |
| A final question! Compare character with each array element | rorey_breaker | Shell Programming and Scripting | 1 | 09-28-2007 09:26 AM |
| Can I assign the contents of file into an array? | murtaza | Shell Programming and Scripting | 10 | 03-28-2007 03:58 AM |
| converting contents of a character array to int | jyotipg | High Level Programming | 5 | 07-19-2006 09:18 PM |
| Creating file contents using contents of another file | ReV | Shell Programming and Scripting | 21 | 02-24-2006 10:25 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
compare array contents with file
I have an array "arrA" with the following contents:
Code:
A0012 Paint Shop.doc ES001 Contract Signature.doc Budget Plan.pdf TS PWS.pdf Code:
A0012 Paint Shop.doc ES001 Contract Signature.doc Budget Plan.pdf TS PWS.pdf Code:
sizeA=${#arrA[*]}
ia=0
while [ $ia -lt $sizeA ]
do
sed -n "/${arrA[$iia]}/!p" Files.dat > mismatches.dat
((ia=ia+1))
done
actual output: Code:
A0012 Paint Shop.doc ES001 Contract Signature.doc Budget Plan.pdf TS PWS.pdf Can anyone point out what is wrong here or supply an alternate method? thanks Last edited by Yogesh Sawant; 03-26-2008 at 01:29 AM.. Reason: added code tags |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|