| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/Automator.framework |
| Availability | Available in Mac OS X v10.4 and later. |
| Companion guide | |
| Declared in | AMShellScriptAction.h |
Instances of the AMShellScriptAction class own Automator actions whose runtime behavior is driven by a shell script or by a Perl or Python script.
When you create a Shell Script Automator Action project in Xcode, the project template supplies an AMShellScriptAction instance as File’s Owner of the action bundle. This ready-made instance provides a default implementation of the AMActionrunWithInput:fromAction:error: method that uses the logic defined in the script. You can substitute your own subclass of AMShellScriptAction for File’s Owner if you need to.
Returns the character that is used as the delimiter between items in the string passed in through standard input.
- (NSString *)inputFieldSeparator
The Automator framework converts the output from the previous action (which is usually in the form of a list or array) into a single string in which the array elements are concatenated by the input field separator. By default this separator is the newline character (@”\n”). You could, for example, override this method to return a null character (@”\0”) to provide null-terminated strings for xargs -0.
AMShellScriptAction.hReturns the character used as a delimiter in the string output of the receiver.
- (NSString *)outputFieldSeparator
The Automator framework converts this string into an array (or list) whose elements are derived from the fields delimited by the separator character, and then passes the array (or list) to the next action in the workflow. The default value is the separator character returned by inputFieldSeparator. Override this method if you want a different delimiter for output.
AMShellScriptAction.hReturns whether you want automatic remapping of carriage return (\r) to newline (\n) characters in the input string.
- (BOOL)remapLineEndings
The default is NO. Override to return YES if you want the remapping to occur.
AMShellScriptAction.hLast updated: 2006-10-26