shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Sed e Regex


From: Ivan lopes
Subject: Re: [shell-script] Sed e Regex
Date: Fri, 30 May 2008 15:13:11 -0300

$ sed -r 's/(\S+ \S+) (\S+) (.*$)/\1 "\2" \3/' a.txt

ou

$ awk 'gsub(/(^|$)/,"\"",$3);' a.txt

ou

$ paste -d" " <(cut -d" " -f1,2  a.txt) <(cut -d" " -f3  a.txt| sed
's/.*/"&"/') <(cut -d" " -f4-  a.txt )


reply via email to

[Prev in Thread] Current Thread [Next in Thread]