Re: [PATCH] truncate: Ignore whitespace in --size parameters

2008-06-30 Thread Jim Meyering
Pádraig Brady [EMAIL PROTECTED] wrote: ... Well found! That space would mean that `truncate -s ' -1' file` would truncate file to 0! It also means that the more likely command of `truncate -s +1 would also truncate a file to 1, rather than extending the size of file by 1 byte. patch

Re: AIX 5.3 df coreutils reportes wrong size - 2.4T limit ?

2008-06-30 Thread Jodok Ole Muellers
Hi, Looks like find has also got a similar but different problem on AIX 5.3: [EMAIL PROTECTED]:/nim# /opt/freeware/bin/find /nim/mksysb/mksysb_nimp /opt/freeware/bin/find: /nim/mksysb/mksysb_nimp: Value too large to be stored in data type [EMAIL PROTECTED]:/nim# /opt/freeware/bin/du -h

Re: tee logs no output if stdout is closed

2008-06-30 Thread Andreas Schwab
Bruno Haible [EMAIL PROTECTED] writes: tee appears to drop its input (i.e. it does not write it into the specified log file) if stdout is closed. I didn't expect this behaviour, and POSIX http://www.opengroup.org/susv3/utilities/tee.html does not mandate this behaviour either. Rather, it

Re: AIX 5.3 df coreutils reportes wrong size - 2.4T limit ?

2008-06-30 Thread Andreas Schwab
Jodok Ole Muellers [EMAIL PROTECTED] writes: Looks like find has also got a similar but different problem on AIX 5.3: find is not part of coreutils. It belongs to findutils. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg,

Re: [PATCH] truncate: Ignore whitespace in --size parameters

2008-06-30 Thread Jim Meyering
Pádraig Brady [EMAIL PROTECTED] wrote: ... diff --git a/tests/misc/truncate-parameters b/tests/misc/truncate-parameters Subject: [PATCH] truncate: ignore whitespace in --size parameters Without this, `truncate -s ' -1' F` would truncate F to length 0, and `truncate -s +1 F` would truncate F

Re: tee logs no output if stdout is closed

2008-06-30 Thread Bruno Haible
Andreas Schwab wrote: $ rm -f empty; touch empty; rm -f output output2; \ for a in 0 1 2 3 4 5 6 7 8 9 ; do \ for b in 0 1 2 3 4 5 6 7 8 9 ; do \ echo g$a$b | tee -a output; \ echo h$a$b output2; \ done; \ sleep 2; \ done \ | { sleep 1; join

Re: tee logs no output if stdout is closed

2008-06-30 Thread Andreas Schwab
Bruno Haible [EMAIL PROTECTED] writes: If 'tee' was to write to the log file(s) first and then only to stdout, and if the input is small (does not need buffering), then its stdin input would show up in the output, and this would also be POSIX compliant. Just put a 'cat /dev/null' in the

Re: tee logs no output if stdout is closed

2008-06-30 Thread Bruno Haible
Andreas Schwab wrote: It also says: ASYNCHRONOUS EVENTS Default ... That indeed appears to imply that when writing a pipe with no readers, the 'tee' process should be killed. This is appropriate for utilities which produce no side effects, i.e. whose _only_ purpose is to produce output

Re: tee logs no output if stdout is closed

2008-06-30 Thread Andreas Schwab
Bruno Haible [EMAIL PROTECTED] writes: How about adding an option '-p' to 'tee', that causes it to ignore SIGPIPE while writing to stdout? Just add a trap '' SIGPIPE before starting tee. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5,

Re: Bug#488024: cp preserves mode with --no-preserve=mode

2008-06-30 Thread Jim Meyering
Jim Meyering [EMAIL PROTECTED] wrote: sergio [EMAIL PROTECTED] wrote: Package: coreutils Version: 6.10-3 % touch qwe % chmod 640 qwe % umask u=rwx,g=rx,o=rx % ls -l qwe -rw-r- 1 sergio sergio 0 Июн 25 22:53 qwe % cp --no-preserve=mode qwe asd % ls -l asd -rw-r- 1 sergio sergio

Re: tee logs no output if stdout is closed

2008-06-30 Thread Phillip Susi
Andreas Schwab wrote: Bruno Haible [EMAIL PROTECTED] writes: How about adding an option '-p' to 'tee', that causes it to ignore SIGPIPE while writing to stdout? Just add a trap '' SIGPIPE before starting tee. Wouldn't that only trap SIGPIPE sent to the shell, not tee? Aren't all signal

Re: tee logs no output if stdout is closed

2008-06-30 Thread Andreas Schwab
Phillip Susi [EMAIL PROTECTED] writes: Andreas Schwab wrote: Bruno Haible [EMAIL PROTECTED] writes: How about adding an option '-p' to 'tee', that causes it to ignore SIGPIPE while writing to stdout? Just add a trap '' SIGPIPE before starting tee. Wouldn't that only trap SIGPIPE sent to

Re: tee logs no output if stdout is closed

2008-06-30 Thread Bruno Haible
Andreas Schwab wrote: How about adding an option '-p' to 'tee', that causes it to ignore SIGPIPE while writing to stdout? Just add a trap '' SIGPIPE before starting tee. Thanks, this does half of the trick: Each 'tee' invocation then writes the complete stdin contents to the log file. But

Re: AIX 5.3 df coreutils reportes wrong size - 2.4T limit ?

2008-06-30 Thread James Youngman
On Mon, Jun 30, 2008 at 9:59 AM, Jodok Ole Muellers [EMAIL PROTECTED] wrote: Hi, Looks like find has also got a similar but different problem on AIX 5.3: [EMAIL PROTECTED]:/nim# /opt/freeware/bin/find /nim/mksysb/mksysb_nimp /opt/freeware/bin/find: /nim/mksysb/mksysb_nimp: Value too large to