Re: proposed new program: getpwnam [Re: --format flag

2003-12-30 Thread Bruce Korb
Bruce Korb wrote: > > But `getpwnam --shell root' is certainly easier to type. And > > as a real program, it'd be able to produce better (including > > internationalized) diagnostics and do better error checking ... > However, in direct answer to your question, I'd consider either adapting > thi

Re: proposed new program: getpwnam [Re: --format flag

2003-12-19 Thread Bob Proulx
Jim Meyering wrote: > Bruce Korb wrote: > > So, what do you think about adding POSIX library/sys calls as > > a collection of command line utilities? We already have "stat", > > but don't have "getpwnam". There are a few others. > I hesitate to add new tools that can be approximated with > o

Re: proposed new program: getpwnam [Re: --format flag

2003-12-18 Thread Bruce Korb
Jim Meyering wrote: > I hesitate to add new tools that can be approximated with > one-liners using e.g Perl > > $ perl -MUser::pwent -e '$pw=getpwnam "root" or die; print $pw->shell,"\n"' > /bin/bash I think I know why I didn't think of that. :-) > [ Coreutils should come with a collecti

proposed new program: getpwnam [Re: --format flag

2003-12-18 Thread Jim Meyering
Bruce Korb <[EMAIL PROTECTED]> wrote: > So, what do you think about adding POSIX library/sys calls as > a collection of command line utilities? We already have "stat", > but don't have "getpwnam". There are a few others. I hesitate to add new tools that can be approximated with one-liners us

Re: --format flag

2003-12-16 Thread Bruce Korb
Jim Meyering wrote: > > I do not believe it would be a significant amount of work: > > If you can do it with an insignificant amount of work, that'd be great. > Have you just volunteered? ;-) My first roofing contractor was discovered to have cut through the earthquake straps holding the two ha

Re: --format flag

2003-12-16 Thread Bruce Korb
Bruce Korb wrote: > > I like the verbose names. > > Are there really three different types of syntax: %w, $w{} and ${}? Oh! Thinko. I just noticed that I substituted '$' for '%' characters. No. Snprintfv is a string formatting library that uses the normal conventions, but is extensible in that

Re: --format flag

2003-12-16 Thread Bruce Korb
> No, more like the following: (warning, these are `made-up' format directives; > it'd take some careful thought to come up with proper choices): > > ls --format="%M %I %U %G %B %D %f\n" > > Implementing something like that properly > would involve a significant amount of work. > If you're int

Re: --format flag

2003-12-16 Thread Jim Meyering
Bruce Korb <[EMAIL PROTECTED]> wrote: >> No, more like the following: (warning, these are `made-up' format directives; >> it'd take some careful thought to come up with proper choices): >> >> ls --format="%M %I %U %G %B %D %f\n" >> >> Implementing something like that properly >> would involve a s

Re: --format flag

2003-12-13 Thread Jim Meyering
Chris Van Nuys <[EMAIL PROTECTED]> wrote: > The item from the TODO list: > > ls: add --format=FORMAT option that controls how each line is printed: > > My question is, would FORMAT be a string or a character like the rest > of the flags for ls? For example, would you have something like: 'ls > -

--format flag

2003-12-13 Thread Chris Van Nuys
The item from the TODO list: ls: add --format=FORMAT option that controls how each line is printed: My question is, would FORMAT be a string or a character like the rest of the flags for ls? For example, would you have something like: 'ls -l --format=octal', or something more like 'ls -l --f