Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: removing spaces from a file name
- X-seq: zsh-users 12512
- From: "d.henman" <dhenman@xxxxxxxxx>
- To: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- Subject: Re: removing spaces from a file name
- Date: Thu, 31 Jan 2008 07:33:05 +0900
- Cc: <zsh-users@xxxxxxxxxx>
- In-reply-to: Your message of Wed, 30 Jan 2008 12:56:05 +0100 <237967ef0801300356q6fe00738ha11723966ce400fe@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns9A3574A71769Dzzappergmailcom@xxxxxxxxxxxx> <237967ef0801300341u1af07b2l1a4aece5614e09dd@xxxxxxxxxxxxxx> <237967ef0801300356q6fe00738ha11723966ce400fe@xxxxxxxxxxxxxx>
I found that I also had to add code to translate Japanese encoded spaces in the following way. This is a two byte code 0x81 0x40. I just built a script to remove the ascii and Japanese space codes as follows:
sed -b -e s/' '/_/g $TEMP_FILE >$TEMP_FILE1
mv $TEMP_FILE1 $TEMP_FILE
sed -b -e s/`echo -n "\x81\x40"`/_/g $TEMP_FILE >$TEMP_FILE1
mv $TEMP_FILE1 $TEMP_FILE
It could be made prettier, but it works as is and I left it.
The point is that there may be other space characters than 0x20 in European languages, or it this covered in zsh?
regards
Darel Henman
Messages sorted by:
Reverse Date,
Date,
Thread,
Author