Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
- Posts: 1
- Joined: Fri Aug 23, 2013 12:49 pm
In Director version 4.6.1 I can't seem to get the right syntax to execute a the below native command in Linux. I have tried several different ways of splitting this up into varialbes in seperate arguments etc. etc. to no avail.
ls /directory/subdir | tail -1
config is as follows:
EXEC TASK - eXECUTABLE* = LS
arg: /directory/subdir | tail -1
Returns this error:
5/29/15 11:23:40 AM INFO Preparing to execute the native command 'ls' with the argument(s) '/directory/subdir/inbound | tail -1'
5/29/15 11:23:40 AM INFO ls: cannot access /directory/subdir/inbound | tail -1: No such file or directory
5/29/15 11:23:41 AM INFO The native command 'ls' finished with a return code of '2'
5/29/15 11:23:41 AM ERROR [9003 - exec] The executable encountered an error with a return code of '2'. To ignore this error, set the attribute 'errorIfExecutableFails' to false.
- Posts: 592
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
While GoAnywhere Director provides a way to execute a native command on the local system, “piping” in a command string in Linux is not supported. This pipe “|” function is actually two commands, the result of the first serves as the input for the second. In technical terms, these are two threads. To accomplish the same result, the first command (before the “|”) can be executed with the Execute Native Command task, then the results used in a second Execute Native Command task.
Lead Solutions Consultant
Return to “Community Forum”