cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ckallen
Level 3

Modify Text File - replace newline characters

Hello all,

I'm new to IA. This is my first post.

I am calling the execute command and storing the process's stdout in an IA variable $EXECUTE_STDOUT$.

My goal is to execute a Modify Text File action, and replace some string in a text file with part of the string contained in the variable $EXECUTE_STDOUT$.

I believe that the custom variable includes a newline character in it. Is there a way to strip out the newline character from this variable so that when I do a string replacement, my final text file will not contain this extra character?

Thanks-
Labels (1)
0 Kudos
(1) Reply
interpaul
Level 3

Not using the Modify Text File task, no.

Sounds like you will need to write a custom action that occurs after the command execution and before the Modify Text File task to have some Java code do this work for you.

It will of course have to reset the variable content with the new value.
0 Kudos