remove values of a file one by one from 2nd file and then print the remaining values of 2nd file
Hi all,
I have 2 files. One contains only 1 column and other one contains 2 columns, let say 1_col.txt and 2_col.txt respectively. Here, I will try to explain with an example.
Input files :
In output files, I need to remove values of 1_col.txt one by one from 2_col.txt and then just print the remaining values of 2_col.txt
output files :
output.1 doesn't have any line containing value "a" .
output.2 doesn't have any line containing value "x".
output.3 doesn't have any line containing value "p".
In this way, the number of output files should be equal to the number of lines in 1_col.txt.
Any help would be highly appreciated,
Thanks & Regards,
Ashwani
Last edited by AshwaniSharma09; 11-09-2010 at 07:26 AM..
Reason: code tags
I hope you see why we want you to use code tags, in this case to preserve the otherwise lost formatting (though bizarre here... I corrected the best the first one leaving to you to do the rest...)
Hi Gurus,
I have a file(weblog) as below
abc|xyz|123|agentcode=sample code abcdeeess,agentcode=sample code abcdeeess,agentcode=sample code abcdeeess|agentadd=abcd stereet 23343,agentadd=abcd stereet 23343
sss|wwq|999|agentcode=sample1 code wqwdeeess,gentcode=sample1 code... (4 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (1 Reply)
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Hello,
I have a data file with 300,000 records in it, and another file which contains only the line numbers of roughly 13,000 records in the data file which have data integrity issues. I'm trying to find a way to print the original data by line number identified in the second file. How can I do... (2 Replies)
Hi All,
I have a file something like
||MY|VAL1|VAL2|VAL3|VAL4||||SOME|NOT||..
||MY|VAL1|VAL2|VAL3|VAL4||||SOME|NOT||..
||MY|VAL1|VAL2|VAL3|VAL4||||SOME|NOT||..
||MY|VAL1|VAL2|VAL3|VAL4||||SOME|NOT||..
||MY|VAL1|VAL2|VAL3|VAL4||||SOME|NOT||..
||MY|VAL12|VAL22|VAL32|VAL42||||SOME|NOT||..... (5 Replies)
leviathan:/lcl/apps/Tivoli/netcool/omnibus/bin>more pmonfile.dat
entp_stdby
ot1p_stdby
lawp_stdby
I am wonder how to remove the _stdby from all the values in this dat file using #!/bin/ksh
Thanks! (4 Replies)
Hi All,
I need to print the lines after 2nd line irrespective of the number of lines in file
if the file contents are like below
----------
root:!:0:0::/root:/usr/bin/ksh
daemon:!:1:1::/etc:
bin:!:2:2::/bin:
sys:!:3:3::/usr/sys:
adm:!:4:4::/var/adm:
uucp:!:5:5::/usr/lib/uucp:... (6 Replies)