Re: Using one file to edit a second file.

"[email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
Morning fellas, 

Thanks for the great feedback. 

Maybe I should have given a little more info or the more realistic issue. 

file1 is actually  a list of know exceptions. The format is given below and is tab delimited but I can squash to a single space ... 

icmp snmp ssh   
N       N       N       hostname              10.10.10.10

I then have file2, a "seedfile", Im basically trying to remove the know exceptions from the seed file. Its format is 

10.101.101.12 hostname Router (some other variable data)

I would normally use grep -vf for this operation. But the results arent as expected. I know this because I put both files into Excel and created formulas to basically do the same thing to double check my rookie bash script. The "numbers" are off by a thousand, that is the results of grep -vf is not inline with the spreadsheet results (sure about the spreadsheet results).

Both files number in the thousands of lines. 

I need to remove the exceptions from the seed and move on to other operations. 

At any rate, thanks for the help. I suppose Ill setup an if statement to get the desired results. ...that just seems spaghetti-ish .. know ?

Thank you again
Have a great day !!

[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.