John Allen <[EMAIL PROTECTED]> writes:
> On Wednesday 11 December 2002 18:21, Guillaume Cottenceau wrote:
> > John Allen <[EMAIL PROTECTED]> writes:
[...]
> > > After all mkinitrd uses awk, and thats in /usr/bin
> >
> > why do you say that?
>
> OK, the /usr/bin/awk is symlinked to ../../bin/awk -> gawk
>
> I'm sure the same can be achieved with awk directly.
Yes of course :). (I had to code find in shell once, for
mkinitrd![1] shell sux)
> eg.
> awk 'BEGIN { x=0; } { if ($1 !~ /^[ \t]*#/ && $2 == "/") { if (x == 0) { print
> $3; x++; }}}' /etc/fstab
Why not only adding 'exit' to the existing stuff? eg:
awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; exit }}' /tmp/fstab
> Maybe head/tail should be in /bin also?
The less we have in /, the better.
--
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/