9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: hugo rivera <uair00@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Q: awk omit cols
Date: Thu, 19 Nov 2009 11:32:13 +0100	[thread overview]
Message-ID: <138575260911190232t45cee5f6va23959c16fddd43a@mail.gmail.com> (raw)
In-Reply-To: <e56a31560911190217h4d8606f2xd55c81a8ae2fbeac@mail.gmail.com>

I think
awk '{$1="";print}'
should do what you want, provided that you don't care about leading spaces.

2009/11/19 Peter A. Cejchan <tyapca7@gmail.com>:
> On Thu, Nov 19, 2009 at 9:52 AM, Russ Cox <rsc@swtch.com> wrote:
>> awk '{print substr($0, 1+length($1)+1)}'
>>
>
> Big thank you, Russ, however, wouldn't it be smarter if we had some
> kind of 'not' operator here...? Sometimes, especially when you write
> the script by hand it is easier to delete few fields than to
> explicitly write out all those remaining... IMHO...
>
> ++pac
>
>



--
Hugo



  reply	other threads:[~2009-11-19 10:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19  8:34 Peter A. Cejchan
2009-11-19  8:52 ` Russ Cox
2009-11-19 10:17   ` Peter A. Cejchan
2009-11-19 10:32     ` hugo rivera [this message]
2009-11-19 10:39       ` Peter A. Cejchan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=138575260911190232t45cee5f6va23959c16fddd43a@mail.gmail.com \
    --to=uair00@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).