LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2011, 03:14 PM   #16
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,243

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684

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
 
Old 07-22-2011, 03:15 PM   #17
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,243

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
Quote:
I was able to fix it
Would you like to share so the rest of us may know the solution?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Counting words in an ASCII text file. stf92 Slackware 8 06-19-2011 05:06 PM
How To Remove Words/Text In A Directory? prayingtosky Linux - Newbie 14 02-25-2011 04:08 PM
how to remove words in a file using sed or any other command Kilam orez Linux - Newbie 4 11-30-2009 09:52 AM
Command to delete words out of a text file. Dazamondo Linux - Newbie 13 06-30-2009 11:48 AM
Replacing words in a text file Raghavan_sat Programming 3 05-27-2008 04:11 PM


All times are GMT -5. The time now is 09:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration