Shell - Save file with extension?

时间:2015-07-31 19:19:22

标签: shell applescript

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??

1 个答案:

答案 0 :(得分:0)

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).