Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-05-2007, 01:01 PM   #1
Registered: Oct 2006
Posts: 179

Rep: Reputation: 15
help with awk


I have a file which has a line as below:


I need to convert the above line to


How do I do it with awk from command prompt ?

Thanks a lot
Old 07-05-2007, 01:35 PM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Just one line??---Use an editor.
sed -i 's:/images:/test/:' filename
(changes all cases of "/images" to "/test")

For really good sed and awk tutorials, search Google using "grymoire sed" and "grymoire awk"


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
awk aggressivebloodcell Linux - Newbie 3 07-02-2007 11:51 PM
Help with awk kshkid Programming 1 12-22-2006 05:59 AM
Do you know awk? Vitalka Programming 5 12-01-2006 10:42 PM
using awk meniscus Linux - Newbie 6 10-05-2006 12:39 PM
using awk wedgeworth Linux - Newbie 9 02-20-2004 07:48 AM > Forums > Non-*NIX Forums > Programming

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

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