Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: removing spaces from a file name



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