Skip to content

Instantly share code, notes, and snippets.

@alex-eg
Created December 23, 2016 15:46
Show Gist options
  • Select an option

  • Save alex-eg/016beeff21a32e49a748a61a72ff8726 to your computer and use it in GitHub Desktop.

Select an option

Save alex-eg/016beeff21a32e49a748a61a72ff8726 to your computer and use it in GitHub Desktop.
alex@virtdebian ~/dev $ cat wut.awk
{ print $1 ",'" $2 "','" $3 "','" $4 "','" $5 "','" $6 "'," $7 ",'" $8 "'," $9 "," $10 }
alex@virtdebian ~/dev $ cat in.txt
1,2,3,4,5,6,7,8,9,0
a,b,c,d,e,f,g,h,j,i
foo,bar,baz,quux,zot,zap,qwe,asdf,uiop,plop
alex@virtdebian ~/dev $ awk -F, -f wut.awk in.txt
1,'2','3','4','5','6',7,'8',9,0
a,'b','c','d','e','f',g,'h',j,i
foo,'bar','baz','quux','zot','zap',qwe,'asdf',uiop,plop
alex@virtdebian ~/dev $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment