Help "wrapping" a terminal command

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Help "wrapping" a terminal command Tue Sep 17, 2019 10:19 am • by Dave61
I want to run a terminal command if a file matches certain conditions.

The command clears any comments that the file has.
Code: Select all
xattr -d name.ext
This works fine in a terminal window, but I am clueless about how to "wrap" this as an embedded script (AppleScript or other flavour).

I have read the Noodlesoft FAQ and tried a few variations but I am flying blind.

Please could somebody point me in the right direction.
Posts: 103
Joined: Tue Jul 10, 2012 4:56 pm

Re: Help "wrapping" a terminal command Tue Sep 17, 2019 11:01 am • by Mr_Noodle
You want to use the "Run shellscript" action. The path to the file is sent as $1. You probably should also use the full path to the xattr command.
Site Admin
Posts: 8363
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Return to Support