1 |
Hi, |
2 |
|
3 |
On Fri, 24 Mar 2006 14:34:22 +0100 (CET) Sascha Lucas |
4 |
<sascha.lucas@×××××××××××××××××.de> wrote: |
5 |
|
6 |
> I want the awk analogon for "cut -f2-", which prints fields #2 to #n. |
7 |
> Is this possible? |
8 |
> |
9 |
> awk '{print $2???}' |
10 |
|
11 |
I'd do the following: |
12 |
|
13 |
awk '{$1="";print $0}' |
14 |
|
15 |
(awk recalculates $0 when $n is modified) |
16 |
This still leaves you with one OFS starting the line (between $1 and |
17 |
$2), you can get rid of this using |
18 |
|
19 |
awk '{$1="";print substr($0,lenght(OFS))}' |
20 |
|
21 |
|
22 |
-hwh |
23 |
-- |
24 |
gentoo-user@g.o mailing list |