LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   help with awk (https://www.linuxquestions.org/questions/programming-9/help-with-awk-566888/)

sang_froid 07-05-2007 01:01 PM

help with awk
 
Hi

I have a file which has a line as below:

DirIcons="/images"


I need to convert the above line to

DirIcons="/test"

How do I do it with awk from command prompt ?

Thanks a lot

pixellany 07-05-2007 01:35 PM

Just one line??---Use an editor.
OR:
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"


All times are GMT -5. The time now is 10:45 PM.