Mac Developer Library

Developer

Automator Framework Reference AMShellScriptAction Class Reference

Options
Deployment Target:

On This Page
Language:

AMShellScriptAction

Instances of the AMShellScriptAction class own Automator actions whose runtime behavior is driven by a shell script or by a Perl or Python script. More...

Inheritance


Conforms To


Import Statement


import Automator @import Automator;

Availability


Available in OS X v10.4 and later.
  • Returns a string to be used as the delimiter between items in the string passed to the action through standard input.

    Declaration

    Swift

    func inputFieldSeparator() -> String!

    Objective-C

    - (NSString *)inputFieldSeparator

    Discussion

    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.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.4 and later, Xcode 2.1 and later.

  • Returns a string used as a delimiter in the string output by the action.

    Declaration

    Swift

    func outputFieldSeparator() -> String!

    Objective-C

    - (NSString *)outputFieldSeparator

    Discussion

    Upon completion, the Automator framework converts an output string provided by the action into an array (or list), to be passed to the next action in the workflow for further processing. The elements in this array are derived from fields delimited by the output field separator. The default value is the separator character returned by inputFieldSeparator. Override this method if you want a different delimiter for output.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.4 and later, Xcode 2.1 and later.

  • Returns whether you want automatic remapping of carriage return (\r) to newline (\n) characters in the input string.

    Declaration

    Swift

    func remapLineEndings() -> Bool

    Objective-C

    - (BOOL)remapLineEndings

    Discussion

    The default is NOfalse. Override to return YEStrue if you want the remapping to occur.

    Import Statement

    import Automator

    Availability

    Available in OS X v10.4 and later, Xcode 2.1 and later.