Re: [PATCH] doc: update for ISO/IEC 80000-13

2011-11-15 Thread Bjartur Thorlacius
On Tue, 15 Nov 2011 16:28:35 -, Paul Eggert egg...@cs.ucla.edu wrote: + /* On GNU/Hurd hosts, getuid etc. can fail and return -1. + However, on GNU/Linux hosts, uid_t is an unsigned value and + getuid etc. can return the positive value (uid_t) -1. To + handle

Re: command for relative path

2011-11-14 Thread Bjartur Thorlacius
On 11/13/11, Dmitry V. Levin l...@altlinux.org wrote: On Sun, Nov 13, 2011 at 07:47:39PM +, Bjartur Thorlacius wrote: I'd prefer a new utility packaged along with an existing realpath utility, By talking about an existing realpath utility you certainly do not mean an utility from GNU

Re: command for relative path

2011-11-13 Thread Bjartur Thorlacius
On 11/13/11, Dmitry V. Levin l...@altlinux.org wrote: AFAIR the coreutils' realpath is called readlink. ;) Except readlink currently doesn't work for symlinks, as it insists on following them before canonicalizing pathnames. Would readlink --relative or something like this be a good choice?

Re: command for relative path

2011-11-12 Thread Bjartur Thorlacius
On Sat, 12 Nov 2011 20:20:57 -, Peng Yu pengyu...@gmail.com wrote: Should this be added to an existing coreutils' command or add a new command to coreutils? Personally I'd prefer to add a command called relpath. But I'm not sure the standard organization in coreutils. There is already an

Re: coreutils Digest, Vol 16, Issue 11

2011-06-30 Thread Bjartur Thorlacius
On 6/17/11, e-letter inp...@gmail.com wrote: On 17/06/2011, coreutils-requ...@gnu.org coreutils-requ...@gnu.org wrote: Which part of base64 [OPTION]... [FILE] is not clear? isn't option '-d' not correct? Yes, it is. Therefore the syntax seems base64 -d ... If no file is to be

bug#8500: util: where am i

2011-04-14 Thread Bjartur Thorlacius
On 4/14/11, Panagiotis Tsiamis ptsia...@gmail.com wrote: Request for adding one more feature on the utillity whoami. The feature should be able to called by where am i or whereami And should locate: a) System hostname b) ip of the system c) current working directory d) anything else that

bug#8490: dd reads random number of records from pipes - named or otherwise - coreutils 8.9

2011-04-13 Thread Bjartur Thorlacius
Have you looked into fullblock? If you only specify bs and count (and not ibs or obs) dd may fill the buffer partially. It'll do try to do count copies, but each copy may contain less data than expected. This sort of makes sense on HDDs or tapes with variable block sizes (where a read would

bug#8420: dirname

2011-04-07 Thread Bjartur Thorlacius
On 4/5/11, Eric Blake ebl...@redhat.com wrote: On 04/05/2011 01:08 PM, Bjartur Thorlacius wrote: _mandates_ that any portable client software must be aware that extensions are permitted, and therefore the burden is on the client (and not on dirname itself) to supply the -- end-of-options

bug#8420: dirname

2011-04-05 Thread Bjartur Thorlacius
On 4/4/11, Eric Blake ebl...@redhat.com wrote: On 04/04/2011 12:49 PM, Bjartur Thorlacius wrote: The options --version and --help are _explicitly_ standards-conforming extensions. The standard requires that any But then again, are these extensions needed, or even desired? Needed? Debatable

bug#8420: dirname

2011-04-04 Thread Bjartur Thorlacius
You should probably not be using $0, as it doesn't contain a pathname. Nonetheless, I believe there's truly a bug. Retyped from the manual for dirname 8.5: SYNOPSIS dirname NAME dirname OPTION While simple, this doesn't describe the GNU implementation, which is more like: dirname -- NAME

bug#8420: dirname

2011-04-04 Thread Bjartur Thorlacius
On 4/4/11, Eric Blake ebl...@redhat.com wrote: On 04/04/2011 11:23 AM, Bjartur Thorlacius wrote: You should probably not be using $0, as it doesn't contain a pathname. Nonetheless, I believe there's truly a bug. Retyped from the manual for dirname 8.5: SYNOPSIS dirname NAME dirname

bug#8102: [head] do not return EXIT_SUCCESS upon premature EOF

2011-02-25 Thread Bjartur Thorlacius
On 2/23/11, Eric Blake ebl...@redhat.com wrote: On 02/23/2011 11:58 AM, Bjartur Thorlacius wrote: That's because this is not a bug, but a POSIX requirement: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html When a file contains less than number lines, it shall be copied

bug#8103: NUL terminated lines

2011-02-25 Thread Bjartur Thorlacius
On 2/24/11, Jim Meyering j...@meyering.net wrote: Bjartur Thorlacius wrote: On 2/24/11, Jim Meyering j...@meyering.net wrote: Bjartur Thorlacius wrote: Maybe we should modify tac to add the -z option. Would you care to write a patch? It would be redundant, as tac -s $'\0' is equivalent

bug#8102: [head] do not return EXIT_SUCCESS upon premature EOF

2011-02-25 Thread Bjartur Thorlacius
On 2/25/11, Bob Proulx b...@proulx.com wrote: Personally I have never thought about that possibility nor needed it. So should I be using a head-alike for iterating over lines, and would such an utility belong to a GNU package, or is awk the right tool for the job? What are you trying to do?

bug#8103: NUL terminated lines

2011-02-24 Thread Bjartur Thorlacius
On 2/24/11, Jim Meyering j...@meyering.net wrote: Bjartur Thorlacius wrote: Maybe we should modify tac to add the -z option. Would you care to write a patch? It would be redundant, as tac -s $'\0' is equivalent. Are you using a non-GNU version of tac? I don't remember whether I was using

Split head.c into two files

2011-02-23 Thread Bjartur Thorlacius
head.c is too complicated for a newbie to grasp at first glance. I suggest splitting the all but last N lines feature (head -n +$n) into a seperate source file, and preferably a seperate binary as well.

bug#8102: [head] do not return EXIT_SUCCESS upon premature EOF

2011-02-23 Thread Bjartur Thorlacius
% echo | head -n2 echo bug bug This bit me when writing a line oriented prompter (which would `while head -n1`). FYI, this also applies to FreeBSD head.

bug#8103: NUL terminated lines

2011-02-23 Thread Bjartur Thorlacius
Maybe we should modify tac to add the -z option. Would you care to write a patch? It would be redundant, as tac -s $'\0' is equivalent. If you want to switch between newline characters dynamically (a bad idea, IMO) you could edit libc/stdio-common/getline.c to pass read in the newline