Gentoo Archives: gentoo-user

From: Hans-Werner Hilse <hilse@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT: awk scripting
Date: Fri, 24 Mar 2006 16:17:35
Message-Id: 20060324170027.1c60ccf2.hilse@web.de
In Reply to: Re: [gentoo-user] OT: awk scripting by Sascha Lucas
1 Hi,
2
3 On Fri, 24 Mar 2006 16:15:09 +0100 (CET) Sascha Lucas
4 <sascha.lucas@×××××××××××××××××.de> wrote:
5
6 > On Fri, 24 Mar 2006, Hans-Werner Hilse wrote:
7 > > awk '{$1="";print $0}'
8 > >
9 > > (awk recalculates $0 when $n is modified)
10 > > This still leaves you with one OFS starting the line (between $1 and
11 > > $2), you can get rid of this using
12 > >
13 > > awk '{$1="";print substr($0,lenght(OFS))}'
14 >
15 > thanks. the function lenght seems not defined. but substr($0,2) works.
16
17 That was a typo. Should of course be "length".
18
19 -hwh
20 --
21 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] OT: awk scripting Sascha Lucas <sascha.lucas@×××××××××××××××××.de>