<<< Date Index >>>     <<< Thread Index >>>

Re: [TRIVIAL] head syntax



Breaking longstanding command line syntax is about as dumb as
putting wildcard records in TLD zones.

I seem to recall that the suggested change was said to break things
on other Unix systems.  The correct patch is probably to add an
"exit" statement to the end of the awk "script."

(Yes, I know I still haven't committed the type-punning patch. ;)

-- 
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.





On 2003-09-18 10:58:33 +0200, Mads Martin Joergensen wrote:
> From: Mads Martin Joergensen <mmj@xxxxxxx>
> To: mutt-dev@xxxxxxxx
> Date: Thu, 18 Sep 2003 10:58:33 +0200
> Subject: [TRIVIAL] head syntax
> X-Spam-Level: 
> 
> Hey people,
> 
> The new GNU coreutils does not anymore accept head/tail -N where N is
> the amount of lines. New syntax enforces head/tail -n N. Trivial patches
> against 1.4.1 and CVS
> 
> --- mutt-1.4.1/muttbug.sh.in
> +++ mutt-1.4.1/muttbug.sh.in
> @@ -183,7 +183,7 @@
>         DPKG=no
>  fi
>  
> -MUTTVERSION="`mutt -v | head -1 | awk '{print $2}'`"
> +MUTTVERSION="`mutt -v | head -n 1 | awk '{print $2}'`"
>  test "$DPKG" = "yes" && SUBMIT="$SUBMIT, $DEBIAN_SUBMIT"
>  
>  exec > ${TEMPLATE}
> 
> and:
> 
> Index: muttbug.sh.in
> ===================================================================
> RCS file: /home/roessler/cvs/mutt/muttbug.sh.in,v
> retrieving revision 3.5
> diff -u -r3.5 muttbug.sh.in
> --- muttbug.sh.in       11 Dec 2002 10:31:29 -0000      3.5
> +++ muttbug.sh.in       18 Sep 2003 08:52:40 -0000
> @@ -201,7 +201,7 @@
>         RPMPACKAGER="`rpm -q -i mutt | sed -n -e 's/^Packager *: *//p'`"
>  fi
>  
> -MUTTVERSION="`mutt -v | head -1 | awk '{print $2}'`"
> +MUTTVERSION="`mutt -v | head -n 1 | awk '{print $2}'`"
>  test "$DPKG" = "yes" && SUBMIT="$SUBMIT, $DEBIAN_SUBMIT"
>  
>  exec > ${TEMPLATE}
> 
> 
> -- 
> Mads Martin Joergensen, http://mmj.dk
> "Why make things difficult, when it is possible to make them cryptic
>  and totally illogical, with just a little bit more effort?"
>                                 -- A. P. J.
>