tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ how do you concatenate all the lines in a file together?

Sorting in BASH ▻

extract columns from line

In article <38D899F6.2F26B815@some.where>, M  <mkstreetdog@bigpond.com> wrote:
>sed -n '${linenum}p' *debug | awk '{print $4 " " $9}' | awk '{print $1}'

Single quotes prevent variable interpolation.

    sed -n "${linenum}p" ...

Tim.
--
Tim Goodwin   | "If you don't know what closures are, you probably don't
Leicester, UK | want to know what closures are." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: extract columns from line
Date: 22 Mar 2000 11:43:39 -0000
Message-ID: <8babm1$ak1$1@ltpcg.star.le.ac.uk>
References: <38D899F6.2F26B815@some.where>

△ comp.unix.shell △

◅ how do you concatenate all the lines in a file together?

Sorting in BASH ▻