Re: stty -g

2007-02-02 Thread Andreas Schwab
Bauke Jan Douma <[EMAIL PROTECTED]> writes: > What is it actually that all gets output by `stty -a'? > Stty(1) wasn't much of a help. The output of 'stty -g' is unspecified. It can only be used as argument to stty for restoring the saved settings. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL

Re: pwd fails to traverse unreadable directory

2007-02-02 Thread Jim Meyering
Thank you for reporting that! I've just checked in the patch below. I'll add tests to coreutils some time next week. This bug affects only systems with openat support (glibc-2.4 and newer and Solaris 10). 2007-02-03 Jim Meyering <[EMAIL PROTECTED]> Make pwd and readlink work also when

Re: stty -g

2007-02-02 Thread Bauke Jan Douma
Mike Frysinger wrote on 02-02-07 23:13: On Friday 02 February 2007, Bauke Jan Douma wrote: What is it actually that all gets output by `stty -a'? Stty(1) wasn't much of a help. your subject says '-g', not '-a' ... but the description of '-a' sounds correct to me: -a: print all current setting

Re: stty -g

2007-02-02 Thread Mike Frysinger
On Friday 02 February 2007, Bauke Jan Douma wrote: > What is it actually that all gets output by `stty -a'? > Stty(1) wasn't much of a help. your subject says '-g', not '-a' ... but the description of '-a' sounds correct to me: -a: print all current settings in human-readable form which part is

dd conv=none

2007-02-02 Thread Bauke Jan Douma
conv=none might be handy when you're building a dd command-line in a shell script. Any thoughts? bjd ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

stty -g

2007-02-02 Thread Bauke Jan Douma
What is it actually that all gets output by `stty -a'? Stty(1) wasn't much of a help. bjd ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils

Re: AIX incorrectly detects strndup

2007-02-02 Thread Matthew Woehlke
Jim Meyering wrote: Matthew Woehlke <[EMAIL PROTECTED]> wrote: ...for some reason, configure on AIX is incorrectly thinking that it has strndup (declared, anyway) from the OS, when it does not UNLESS '_ALL_SOURCE' is defined. This causes a build failure in xstrndup (from coreutils 6.6, and Jim's

Re: patch for a race condition and a related bug in cp

2007-02-02 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > What I'd really like is a test case to exercise (and prevent > reintroduction of) the race condition bug. Even if it has to > involve use of a debugger and/or sleeping in the test harness. Well, as you know I'm a bit leery of debuggers and/or sleeps, bu

selinux branch: new program: runcon

2007-02-02 Thread Jim Meyering
Here's the delta: --- AUTHORS|1 + ChangeLog-selinux | 11 +++ README | 10 +- man/Makefile.am|4 +- man/runcon.x | 14 +++ po/ChangeLog |4 + po/POTFILES.in |1 + src/Makefile.am|4 +- src/runcon.c | 249 ++

Re: basename sucks (OT)

2007-02-02 Thread Bauke Jan Douma
Philip Rowlands wrote on 02-02-07 18:52: On Fri, 2 Feb 2007, Bauke Jan Douma wrote: Reminds me of something. This is largely off-topic, but does anyone know of a utility FOO that takes a path or file as input an outputs a full, absolute, rooted path? readlink -f sounds close to what you wan

Re: basename sucks

2007-02-02 Thread Mike Frysinger
On Friday 02 February 2007, Andreas Schwab wrote: > Mike Frysinger <[EMAIL PROTECTED]> writes: > > you cant pipe into shell functions :( > > Sure you can. err, you're right ... i'm thinking xargs ... you cant give shell functions to xargs -mike pgpHUlHR1JPq3.pgp Description: PGP signature _

Re: basename sucks (OT)

2007-02-02 Thread Philip Rowlands
On Fri, 2 Feb 2007, Bauke Jan Douma wrote: Reminds me of something. This is largely off-topic, but does anyone know of a utility FOO that takes a path or file as input an outputs a full, absolute, rooted path? readlink -f sounds close to what you want. Cheers, Phil __

Re: basename sucks (OT)

2007-02-02 Thread Bauke Jan Douma
Andreas Schwab wrote on 02-02-07 18:18: [EMAIL PROTECTED] (Bob Proulx) writes: Then Mike's suggestion of using the shell directly is the best choice for efficiency. No process forks and everything is done internally to the shell. It should be quite fast. dirname - ${foo%/*} Note that thi

Re: basename sucks

2007-02-02 Thread Andreas Schwab
[EMAIL PROTECTED] (Bob Proulx) writes: > Then Mike's suggestion of using the shell directly is the best choice > for efficiency. No process forks and everything is done internally to > the shell. It should be quite fast. > > dirname - ${foo%/*} Note that this is not a full replacement. It do

Re: basename sucks

2007-02-02 Thread Andreas Schwab
Mike Frysinger <[EMAIL PROTECTED]> writes: > you cant pipe into shell functions :( Sure you can. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5

Re: basename sucks

2007-02-02 Thread Matthew Woehlke
Mike Frysinger wrote: you cant pipe into shell functions :( Um... you can't? Funny, it WJFFM... -- Matthew OFFICER throws a tear gas grenade at you. You start to feel nauseous. You need fresh air quickly. > OPEN WINDOWS Sorry, I have a philosophical objection to Microsoft products. __

Re: basename sucks

2007-02-02 Thread Mike Frysinger
On Friday 02 February 2007, Bob Proulx wrote: > Alfred M. Szmidt wrote: > > echo /home/me/foo | xargs -l basename > > foo > > > > When doing the filter trick, you'd end up forking three new processes > > each time. Which can cause quite a serious slow down in some scripts. > > Then Mike'

Re: basename sucks

2007-02-02 Thread Matthew Woehlke
Bob Proulx wrote: Besically in the shell the use of dirname and basename are going to be less efficient because they are silly things to begin with. It is a very simple operation and there are whole external commands for doing it? Wow. Yes, there are. Bourne shell(*) can't do the tricks that

Re: basename sucks

2007-02-02 Thread Bob Proulx
Alfred M. Szmidt wrote: > echo /home/me/foo | xargs -l basename > foo > > When doing the filter trick, you'd end up forking three new processes > each time. Which can cause quite a serious slow down in some scripts. Then Mike's suggestion of using the shell directly is the best choice

Re: c99-to-c89 patch... oops?

2007-02-02 Thread Matthew Woehlke
Jim Meyering wrote: Matthew Woehlke wrote: ...is there a reason the leading directories are inconsistent, or is this an oversight? Most of the patch applied with -p2 except shred.c, which needed -p0. This is from Jim's 6.7+ snapshot from Jan-26. Thanks for the testing and report. I didn't noti

Re: basename sucks

2007-02-02 Thread Alfred M. Szmidt
> > Regarding the original query, why not just use awk? Or just use basename with a little xargs added. This seems very readable and obvious to me. echo /home/me/foo | xargs -l basename foo And then zero terminated strings are already supported. printf "/home/me/foo\

Re: patch for a race condition and a related bug in cp

2007-02-02 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > Here's a patch to fix a couple of bugs in 'cp'. In re-reviewing this > patch I see that I could split it into two patches if you like, since > the bugs are separably fixable. But for now I thought I'd just get > this out the door. > > 2007-02-02 Paul Egge

patch for a race condition and a related bug in cp

2007-02-02 Thread Paul Eggert
Here's a patch to fix a couple of bugs in 'cp'. In re-reviewing this patch I see that I could split it into two patches if you like, since the bugs are separably fixable. But for now I thought I'd just get this out the door. 2007-02-02 Paul Eggert <[EMAIL PROTECTED]> * NEWS: Document