[Linux-disciples] A function call for escaped characters

Stephen R Laniel steve at laniels.org
Tue Aug 9 16:44:59 EDT 2005


This might be a bit of an obscure question, but: is there
any bash function call that will tell me which characters
get escaped? Because let's say I wanted to write a command
line to go through all the files in my home directory and
clean them up by lower-casing their names and replacing any
escaped characters with 'clean' alternates -- e.g., spaces
with underscores. I could manually do something like

find ~ -depth -execdir rename s/[\'\"\ ]//g \;

to simply delete all the escaped characters, but I'll
probably miss some this way. It would be nice if there were
a function that tells me which characters bash escapes,
whence I could just delete all of them at once. Certain
*bash* knows which characters it escapes; is there any way
to extract that information from the shell?

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050809/55158799/attachment.pgp


More information about the Linux-disciples mailing list