On 00:12 Thu 02 Aug, sjferr...@gmail.com wrote: >> On 19:52 Wed 01 Aug, Kurt H Maier wrote: >>>On Wed, Aug 01, 2012 at 07:28:57PM -0400, Steven Blatchford wrote: >>>> >>>> What is your awk to print fields three and four with this input: >>>> >>>> 'foo bar baz quz' >>>> >>> >>>Depends on what output format I want. Get to the point instead of >>>trying to set me up for failure; I don't have time for this shit >> >> I wanted to know how you use awk to get the same output as >> "cut -d' ' -f3-" > >awk '{for (i=3; i<=NF; i++) printf "%s ", $i} END {print}' > > >> Also what about "cut -d' ' -f1,3,9-" ? > >awk '{printf "%s %s ", 1, 3; for (i=9; i<=NF; i++) printf "%s ", $i} END >{print}' > I think you mean '... END {printf "\n"}' but even with this you have a trailing space.
- Re: [dev] [PATCH] sbase: add cut Uriel
- Re: [dev] [PATCH] sbase: add cut Nick
- Re: [dev] [PATCH] sbase: add cut Kurt H Maier
- Re: [dev] [PATCH] sbase: add cut hiro
- Re: [dev] [PATCH] sbase: add cut Steven Blatchford
- Re: [dev] [PATCH] sbase: add cut Kurt H Maier
- Re: [dev] [PATCH] sbase: add cut Steven Blatchford
- Re: [dev] [PATCH] sbase: add cut Kurt H Maier
- Re: [dev] [PATCH] sbase: add cut Steven Blatchford
- Re: [dev] [PATCH] sbase: add cut sjferrara
- Re: [dev] [PATCH] sbase: add cut Steven Blatchford
- Re: [dev] [PATCH] sbase: add cut Paul Onyschuk
- Re: [dev] [PATCH] sbase: add cut hiro
- Re: [dev] [PATCH] sbase: add cut Martin Kopta
- Re: [dev] [PATCH] sbase: add cut Calvin Morrison
- Re: [dev] [PATCH] sbase: add cut Kurt H Maier
- Re: [dev] [PATCH] sbase: add cut Martin Kopta
- Re: [dev] [PATCH] sbase: add cut Jacob Todd
- Re: [dev] [PATCH] sbase: add cut Uriel
- Re: [dev] [PATCH] sbase: add cut Calvin Morrison
- Re: [dev] [PATCH] sbase: add cut Connor Lane Smith