10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Within my text file i have several thousand lines of text with some lines containing duplicate strings/words. I would like to entirely remove those lines which contain the duplicate strings.
Eg;
One and a Two
Unix.com is the Best
This as a Line Line
Example duplicate sentence with the word... (22 Replies)
Discussion started by: martinsmith
22 Replies
2. Shell Programming and Scripting
Hi Guys,
I need some script in removing lines containing strings like ",, ," and "rows". Retain only numbers as the output. See below for the input and output file.
INPUT FILE:
9817
9832
6285
6312
6313
6318
,, ,
6329
7078
7098
7130
7959
7983 (7 Replies)
Discussion started by: pinpe
7 Replies
3. Shell Programming and Scripting
Hi everyone
I have a dilemma and I'm hoping someone has an answer for me.
I have two files:
# cat masterfile
line3
line4
line5
line6
line7
# cat tempfile
line1
line2
line3
line4
I want to compare tempfile with masterfile. (3 Replies)
Discussion started by: soliberus
3 Replies
4. Shell Programming and Scripting
Good Morning,
I was wondering if anybody could tell me how to achieve the following, preferably with a little commenting for understanding.
I have 2 files, each with multiple rows with multiple columns.
I need to find each row where the value in column 1 of file 1 matches column 1... (10 Replies)
Discussion started by: GarciasMuffin
10 Replies
5. Shell Programming and Scripting
pls help me on this... and im really sorry because i really don't know where to start here...
FILE1
ABC DEF 10 2
DEF GHI 11 3
GHI JKL 12 5
JKL MNO 13 7
MNO PQR 14 5
requirements:
1. The third string should only be 10 or 12
2. The fourth string should only be 2 or 3
3. Prinnt... (1 Reply)
Discussion started by: kingpeejay
1 Replies
6. Shell Programming and Scripting
I have two files and need to compare the two files and to remove the matching lines from both the files (4 Replies)
Discussion started by: shellscripter
4 Replies
7. Shell Programming and Scripting
Thank you for assisting,
I've got a partial solution just needs a tweak.
Hulk-BASH$ cat somefile.txt
oh there is some stuff here
some more stuff here
START_LABEL
stuff I want
more stuff I want
END_LABEL
other stuff here too
and even more stuff here too
Hulk-BASH$
Hulk-BASH$ sed... (8 Replies)
Discussion started by: laser
8 Replies
8. Shell Programming and Scripting
Hi,
I have two files, in which the second file has exactly the same contents of the first file with some additional records. Now, if I want to remove those matching lines from file2 and print only the extra contents which the first file does not have, I could use the below unsophisticated... (3 Replies)
Discussion started by: royalibrahim
3 Replies
9. Shell Programming and Scripting
Hi,
HP-UX gxxxxxxxc B.11.23 U ia64 3717505098 unlimited-user license
I have a file with below pipe separated field values:
xxx|xxx|abcd|xxx|xxx|xx
xxx|xxx|abcd#123|xxx|xxx|xx
xxx|xxx|abcd#345|xxx|xxx|xx
xxx|xxx|pqrs|xxx|xxx|xx
xxx|xxx|pqrs#123|xxx|xxx|xx
The third field has values like... (6 Replies)
Discussion started by: Nanu_Manju
6 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I am a total linux newbie and I can't seem to find a solution to this little problem.
I have two text files with a huge list of URLS. Let's call them file1.txt and file2.txt
What I want to do is grab an URL from file2.txt, search file1.txt for the URL and if found, delete it from... (11 Replies)
Discussion started by: rmarcano
11 Replies