[comp.unix.shell] awk command?

quan@sol.surv.utas.edu.au (Stephen Quan) (01/03/91)

In CSH could you do the following :

input:                              output:
The quick brown fox jumped          The quick brown fox jumped
#include "filea"                    <a cat of filea>
#include "fileb"                    <a cat of fileb>
over the lazy dog.                  over the lazy dog.

and would it be just an awk command?

Stephen Quan,
University of Tasmania.

dberg@informix.com (David I. Berg) (01/04/91)

In article <quan.662875489@sol> quan@sol.surv.utas.edu.au (Stephen Quan) writes:
>In CSH could you do the following :
>
>input:                              output:
>The quick brown fox jumped          The quick brown fox jumped
>#include "filea"                    <a cat of filea>
>#include "fileb"                    <a cat of fileb>
>over the lazy dog.                  over the lazy dog.

I would suggest:

The quick brown fox jumped
`cat filea`
`cat fileb`
over the lazy dog.
  ___                   ___              dberg@cougar.informix.com
  /  ) __      . __/    /_ ) _       __  Informix Software Inc.  (303) 850-0210
_/__/ (_(_ (/ / (_(_  _/__> (-' -/~ (_-  5299 DTC Blvd #740; Englewood CO 80111
{uunet|pyramid}!infmx!dberg
                         The opinions expressed herein are those of mine alone.

quan@sol.surv.utas.edu.au (Stephen Quan) (01/04/91)

I wrote :
>In CSH could you do the following :
>
>input:                              output:
>The quick brown fox jumped          The quick brown fox jumped
>#include "filea"                    <a cat of filea>
>#include "fileb"                    <a cat of fileb>
>over the lazy dog.                  over the lazy dog.
>
>and would it be just an awk command?

Best solution was : cpp -P < input > output

Thanks to Bob Weissman, Mark Boyd and Bruce Barnett who suggested that
cpp does the trick, and also thanks to Eric Brill who did come up with
an 'awk' command and Bob Beaulieu who dropped a line.  Also, thanks,
to others who I may have left out their names.

Stephen Quan,
University of Tasmania.