Search Results

Search: Posts Made By: singerfc
4,548
Posted By yinyuemi
awk 'gsub("\"","\"",$0)%2{++p}NF{if(/\"/) {printf...
awk 'gsub("\"","\"",$0)%2{++p}NF{if(/\"/) {printf (p%2?$0" ":$0" \n")} else {printf (p%2?$0"\\n":$0"\n")}}' (file://\\n":$0"\n")}}') file
"one":"field one",
"two":"field two",
"three":" field...
4,548
Posted By ctsgnb
You can also have a look at this link...
You can also have a look at this link (http://docstore.mik.ua/orelly/unix3/sedawk/appb_03.htm)
4,548
Posted By yinyuemi
you can do like this: awk 'CODE' inputfile...
you can do like this:
awk 'CODE' inputfile >temp; cat temp >inputfile; rm temp
4,548
Posted By yinyuemi
how about this? awk 'BEGIN { clientlist = "" ...
how about this?
awk 'BEGIN {
clientlist = ""
FS=":"}
{v=v?v RS $0:$0}
/client/ { clientlist = clientlist $2 }
END { print clientlist"]" RS v }
'
file
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy