---
title: AMShellScriptAction
framework: automator
role: symbol
role_heading: Class
path: automator/amshellscriptaction
---

# AMShellScriptAction

An object that represents Automator actions whose runtime behavior is driven by a shell script or by a Perl or Python script.

## Declaration

```swift
class AMShellScriptAction
```

## Overview

Overview When you create a Shell Script Automator Action project in Xcode, the project template supplies an AMShellScriptAction instance as the Principal Class of the action bundle. This ready-made instance provides a default implementation of the AMAction run(withInput:) method that uses the logic defined in the script. You can substitute your own subclass of AMShellScriptAction for Principal Class if you need to.

## Topics

### Handling the I/O Separator Character

- [inputFieldSeparator](automator/amshellscriptaction/inputfieldseparator.md)
- [outputFieldSeparator](automator/amshellscriptaction/outputfieldseparator.md)
- [remapLineEndings](automator/amshellscriptaction/remaplineendings.md)

## Relationships

### Inherits From

- [AMBundleAction](automator/ambundleaction.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Actions

- [AMBundleAction](automator/ambundleaction.md)
- [AMAction](automator/amaction.md)
