LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Compare the file (https://www.linuxquestions.org/questions/linux-server-73/compare-the-file-4175414526/)

ust 07-02-2012 06:35 PM

Compare the file
 
I may be make it confued so I would like to clearly re-post my question .

http://www.linuxquestions.org/questi...mn-4175413633/

I have a master file , the content is as below.
#vi master.txt
"d"""""""" aaa bbb ccc ddd eee " " "
"""y""d"""" xxx yyy zzz mmm ooo " " "
""f""""""" ggg hhh iii jjj kkk " " "

I also have some text files ,
eg.
#vi file1.txt
aaa
#vi file2.txt
bbb
#vi file3.txt
ccc
#vi file4.txt
ddd

I would like to check if the fourth column ( eg. ddd mmm jjj ) is exist in these text files , if not exist , then output this line , in this case , output the below ( as ddd exists in file4.txt )
"""y""d"""" xxx yyy zzz mmm ooo " " "
""f""""""" ggg hhh iii jjj kkk " " "

The requirement is check
1) after 9 " , and
2) the 4th column of the string that delimited by space .

can advise what can I do ? Thanks

unSpawn 07-02-2012 07:39 PM

I'm sorry but you should post your thread / question once and in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be merged because it is a duplicate / addition.

grail 07-02-2012 07:52 PM

I agree this should be merged as the new information will help those already providing solutions on your question.

dru8274 07-02-2012 10:47 PM

I have added ust's extra info to the previous thread here, and provided a possible solution there too.


All times are GMT -5. The time now is 08:20 PM.