LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to remove duplicate words within a particular text in a file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-remove-duplicate-words-within-a-particular-text-in-a-file-893154/)

grail 07-22-2011 02:14 PM

Looks like I jumped the gun. New input I would use:
Code:

awk 'BEGIN{FS = ","}$1 ~ /TITLE/{split($1,a,">");gsub(a[2],"");$1 = $1 a[2] FS;gsub(/ +/," ")}1' file

grail 07-22-2011 02:15 PM

Quote:

I was able to fix it
Would you like to share so the rest of us may know the solution?


All times are GMT -5. The time now is 06:02 PM.