[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: POSIX patches

From: Olaf Hering <olh_at_suse.de>
Date: 2003-04-23 18:07:52 CEST

 On Wed, Apr 23, Greg Hudson wrote:

> On Wed, 2003-04-23 at 03:14, Olaf Hering wrote:
> > coreutiles do not accept -1 anymore. consider applying.
> You mean FSF's coreutils?

Yes, typo:

nectarine:/ # head --version
head (coreutils) 5.0
Written by David MacKenzie.

Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
nectarine:/ # head -1 /etc/profile
head: `-1' option is obsolete; use `-n 1'
Try `head --help' for more information.
nectarine:/ # head --help
Usage: head [OPTION]... [FILE]...
Print first 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the file name.
With no FILE, or when FILE is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
  -c, --bytes=SIZE print first SIZE bytes
  -n, --lines=NUMBER print first NUMBER lines instead of first 10
  -q, --quiet, --silent never print headers giving file names
  -v, --verbose always print headers giving file names
      --help display this help and exit
      --version output version information and exit

SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.

Report bugs to <bug-coreutils@gnu.org>.
nectarine:/ #

> susv2 documents the head -N syntax (see
> http://www.opengroup.org/onlinepubs/7908799/xcu/head.html ); it seems
> pretty unwise of any implementation not to support it.

We can do it without head and tail.

-ah_version=`${AUTOHEADER:-autoheader} --version 2>/dev/null|head -1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
+ah_version=`${AUTOHEADER:-autoheader} --version 2>/dev/null|sed '1s/^[^0-9]*//;s/[a-z]* *$//;q'`

- VERSION="`svn st -vu README | tail -1 | awk '{print $3}'`"
+ VERSION="`svn st -vu README | awk '{i=$3}END{print i}'`"

USB is for mice, FireWire is for men!
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 23 18:14:04 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.