views:

15

answers:

2

Hi,

From shell script, I would like to create the empty 'Icon\r' file for a Mac OS X disk image (dmg), so as the .VolumeIcon.icns icon file is taken into account by the finder; the damn '\r' character is not accepted from the console:

touch Icon\r
ls Icon*

> Iconr

and other things happen when trying to type 'Icon\r', "Icon\r" etc., I can't achieve to make it accept "\r" as the typical carriage return required at the end of the file name.

Any idea how to type it?

Thanks

+1  A: 
echo -e "Icon\\r" | xargs touch
larsmans
+1  A: 

I assume the file name should be five characters, the last one being a carriage return. In bash or zsh:

touch $'Icon\r'

Or you can type the carriage return in the shell: touch Icon Ctrl+V Ctrl+M Enter .

Gilles