10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Tried using sed and uniq but it's removing the entire line. Can't seem to figure a way to just remove the word. Any help is appreciated. I have a file:
dog, text1, text2, text3
dog, text1, text2, text3
dog, text1, text2, text3
cat, text1, text2, text3 Trying to remove all duplicate instances... (6 Replies)
Discussion started by: jimmyf
6 Replies
2. Shell Programming and Scripting
How to remove first pair of parentheses and content in them from the beginning of the line?
Here's the list:
(ok)-test
(ok)-test-(ing)
(some)-test-(ing)-test
test-(ing)
Desired result:
test
test-(ing)
test-(ing)-test
test-(ing)
Here's what I already tried with GNU sed:
sed -e... (6 Replies)
Discussion started by: useretail
6 Replies
3. UNIX for Advanced & Expert Users
I have following statement and I want to find duplicate word using sed command. How is it possible?
"detect string and remove the duplicate string"
There could be many statements in a file and each line may have duplicate word.
Thanks! (1 Reply)
Discussion started by: jnrohit2k
1 Replies
4. Shell Programming and Scripting
Hi ,
I have a pipe seperated file repo.psv where i need to remove duplicates based on the 1st column only. Can anyone help with a Unix script ?
Input:
15277105||Common Stick|ESHR||Common Stock|CYRO AB
15277105||Common Stick|ESHR||Common Stock|CYRO AB
16111278||Common Stick|ESHR||Common... (12 Replies)
Discussion started by: samrat dutta
12 Replies
5. Shell Programming and Scripting
All,
I have a file with below entries.
/java/usr/abc/123
/java/usr/xyz/123_21
/java/usr/ab12/345/234
.........
.........
And I need entry as
/java/usr/abc/config
/java/usr/xyz/config
/java/usr/ab12/config
.........
.........
Actually, I need to remove all other entries... (2 Replies)
Discussion started by: anshu ranjan
2 Replies
6. Shell Programming and Scripting
Hi folks,
I have file with the below
1245633505 +manual mroennfeldt@news.com.au
1245633506 +manual sal@bynews.com.au
1245633506 +manual whson@btimes.com
1245633507 +manual karla.marsden@tnews.com.au
1245633508 +manual king@netn.com.au
Now, I need the output of the files only with... (4 Replies)
Discussion started by: gsiva
4 Replies
7. Shell Programming and Scripting
Hi,
Please help!
I have a file having duplicate words in some line and I want to remove the duplicate words.
The order of the words in the output file doesn't matter.
INPUT_FILE
pink_kite red_pen ball pink_kite ball
yellow_flower white no white no
cloud nine_pen pink cloud pink nine_pen... (6 Replies)
Discussion started by: sam_2921
6 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Let me explain the problem clearly:
Let the entries in my file be:
lion,tiger,bear
apple,mango,orange,apple,grape
unix,windows,solaris,windows,linux
red,blue,green,yellow
orange,maroon,pink,violet,orange,pink
Can we detect the lines in which one of the words(separated by field... (8 Replies)
Discussion started by: srinivasan_85
8 Replies
9. Shell Programming and Scripting
i have a text its contain many record, but its written in one line,
i want to remove from that line the duplicate record,
not record have fixed width ex: width = 4
inputfile test.txt =abc cdf abc abc cdf fgh fgh abc abc
i want the outputfile =abc cdf fgh
only those records
can any one help... (4 Replies)
Discussion started by: kazanoova2
4 Replies
10. UNIX for Dummies Questions & Answers
Hi, can anyone help me with this small problem.
Say i've got duplicate words in a list e.g
blue
orange
green
green
pink
blue
red
How can I delete all reoccurences of the same word?
Thanks (1 Reply)
Discussion started by: zulander
1 Replies