Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

File Replace String activity

The File Replace String activity finds and replaces a string in a file on a Linux or UNIX computer.

This activity replaces an SSH activity by the same name available in releases prior to Istanbul. If you have a workflow created in a previous version that uses the deprecated activity, your workflow will continue to work normally after upgrading to Istanbul. However, all new workflows must use the custom version of this activity. This activity was built with the SSH activity template, which gives workflow administrators the ability to store input and output variables in the databus.

Input variables

VariableDescription
hostnameHostname or IP address of destination server for SSH activity.
directoryName of the working \(target\) directory.
fileName of the file in which the string is to be replaced.
find\_patternA regular expression of the text to replace.
replace\_stringThe replacement string for the text found by the expression in the find_pattern variable.
optionsReplacement options:- first: Replaces the first occurence of the pattern. - all: Replaces all occurrences of the pattern.

Output variables

VariableDescription
return_codeIndicates whether or not the string was replaced successfully in the target file.
error_messageMessage that indicates if an error has occurred. Any value other than 0 indicates a failure.

Conditions

ConditionDescription
SuccessThe activity has successfully replaced the string in the file.
FailureThe activity has failed to replaced the string in the file.

Parent Topic:SSH activity pack