How to create an empty "Icon \ r" file for .dmg from a shell script?

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

touch Icon\r ls Icon* > Iconr 

and other things arise when trying to enter 'Icon\r' , "Icon\r" , etc., I cannot get it to accept "\ r" as the typical carriage return needed at the end of the file name.

Any idea how to type it?

thanks

+4
source share
3 answers
 echo -e "Icon\\r" | xargs touch 
+2
source

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

 touch $'Icon\r' 

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

+4
source

In bash, you can open your quotation marks and type β€œIcon,” then close the quotation marks in the next line (your prompt should be a>).

0
source

All Articles