简体   繁体   中英

Shell - Save file with extension?

The following is the code I have (and compiles), however, it saves the file without any extension. How can I save the file as a ".plist" ?

do shell script "echo '{ Filter = { Bundles = ( \"'" & proj & "'\" ); }; }' >> ~/Desktop/gametocheat/" & proj & " "

"proj" is a string. - If this looks a bit weird is because im doing it on Applescript, but is pretty much the same code as shell.

Anyone??

I think you're after:

do shell script "echo '{ Filter = { Bundles = ( \"'" & proj & "'\" ); }; }' >> ~/Desktop/gametocheat/" & proj & ".plist"

This will append ".plist" to your proj variable (see the shell redirection at the end of the line).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM