gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: File naming conventions


From: Zenaan Harkness
Subject: Re: [Gnu-arch-users] Re: File naming conventions
Date: Thu, 21 Oct 2004 10:49:33 +1000

On Thu, 2004-10-21 at 10:08, address@hidden wrote:
> > There is the command tla escape (and tla escape --unescaped). But they
> > 
> > only read a single command line argument. So you can't do:
> > 
> > tla inventory --source | tla escape --unescaped | xargs chmod 644
> > and you can't do
> > tla inventory --source | xargs tla escape --unescaped | xargs chmod
> > 644
> 
> Try:
> 
> tla inventory --source |\
>   while read line; do
>     chmod 644 "$(tla escape --unescaped "$line")";
>   done
> 
> the stream-mode was not added to tla escape because it wont handle
> newlines in filenames and wont work with leading/trailing whitespaces.
> 
> tla inventory --source --unescaped |\
>   while read line; do
>     chmod 644 "$line";
>   done
> 
> will work if you are sure that there are no newlines in filenames.

The point is, you're now basically at the bash script level.
This is not something I would feel comfortable typing in at
the command line at random points in the future.

If it works, that's certainly useful though... in which case,
I'd suggest we're back to the following:

  tla chmod
  tla ln
  ...

since the alternative is things like tla[-]chmod, which every
man and his dog will write, and you start to go "why isn't this
default". And the default convention for tla proper is a Unixy
sub-command space.

cheers
zen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]