[GRASS5] wrapper for awk?
Justin Hickey
jhickey at hpcc.nectec.or.th
Tue Mar 6 21:59:18 EST 2001
Hi Markus
Markus Neteler wrote - slightly rearranged:
> Maybe "gawk" is a requirement which can't be fulfilled everywhere,
> then we should consider option 2.
Yes, some machines do not install gawk by default, one being SGI.
However,
> I have just checked SUN's awk which offers:
>
> awk
> awk: Usage: awk [-Fc] [-f source | 'cmds'] [files]
^^^^^^
This is also the case on SGI so why can't we use awk? From the
fig2grass script we have the following
gawk --source='
function formerr() {
printf "*** WRONG FIG 3.2 FORMAT ! ***\n"
exit 1
}
<skip>
' $1 $2
So why can't we do the following?
awk '
function formerr() {
printf "*** WRONG FIG 3.2 FORMAT ! ***\n"
exit 1
}
<skip>
' $1 $2
If this does not work, then the only option is the second one. That is,
store the awk script in a separate file and have fig2grass call
awk -f fig2grass.awk
or something like that.
Just my 2 cents worth.
--
Sincerely,
Jazzman (a.k.a. Justin Hickey) e-mail: jhickey at hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do. ---Anonymous
Jazz and Trek Rule!!!
==================================================================
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list