> 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}'