[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Gnu-arch-users] Trying out the new escaping version...
From: |
Parker, Ron |
Subject: |
RE: [Gnu-arch-users] Trying out the new escaping version... |
Date: |
Thu, 18 Mar 2004 10:36:39 -0600 |
> From: Pierce T.Wetter III [mailto:address@hidden
> Sent: Thursday, March 18, 2004 9:06 AM
> To: address@hidden
> Let's say you have a directory of files:
>
> "bad example.html"
> "worse example .html"
> "bad dir/bad example.html"
>
> With Pika escaping, you might think you could do this:
>
> tla add bad\(sp)example.html
Not something I would have considered typing in the first place. Why make
things harder on myself, when I am already habitualized to do what you point
out next.
> tla add bad\ example.html
> tla add "bad example.html"
>
> Is actually easier!
Yes and in my experience when dealing with spaced-out file names I am
already in the habit of typing 'bad example.html' or bad\ example.html. I
don't see this as a problem and it works without tla having to do anything.
> tla tree-lint -t
>
> will output
>
> bad\(sp)example.html
> worse\(sp)example\(sp).html
> bad\(sp)dir/bad\(sp)example.html
> tla tree-lint -t | xargs -p -I % tla add %
>
> Will try to do:
>
> tla add bad(sp)example.html
>
> because xargs ate the \..
You betcha, but the following does work:
tla tree-lint -t |sed 's=\\=\\\\=g'|xargs -p tla add
And at least in bash I can simplify that with the following alias[1]:
alias targs='sed '\''s/\\/\\\\/g'\''|xargs'
Then,
tla tree-lint -t |targs -p tla add
works just fine.
> mkdir "pika escaping sucks"
> cd "pika escaping sucks"
> touch "yes it really does"
> mkdir 'theory is !(practice)'
> cd 'theory is !(practice)'
> touch 'quotes " are good"
> touch 'aren\'t they'
Being a masochist I almost took this bait just to make a point. But, at
least the last two lines don't appear completely valid to me. And, given
your apparent frustration level, I didn't want to guess what you were trying
to do. Also, I need to build a hybrid cehteh-lode.leroy version.
[1] (Which, as an aside I believe points out just how inscrutable shell
escaping can become as well. Don't even make me insert any part of that in
backquotes and have it do the right thing.)
--
Ron Parker
echo Quoth the shell, \"Nevermore.\"
- Re: [Gnu-arch-users] Trying out the new escaping version..., (continued)
Re: [Gnu-arch-users] Trying out the new escaping version..., Jan Hudec, 2004/03/18
Re: [Gnu-arch-users] Trying out the new escaping version..., Tom Lord, 2004/03/18
Re: [Gnu-arch-users] Trying out the new escaping version..., Jan Hudec, 2004/03/18
Re: [Gnu-arch-users] Trying out the new escaping version..., Tom Lord, 2004/03/18
Re: [Gnu-arch-users] Trying out the new escaping version..., Jan Hudec, 2004/03/18
RE: [Gnu-arch-users] Trying out the new escaping version...,
Parker, Ron <=