I am trying to run below command from EXEC() peoplecode but getting return code 1.
&cmd = tail -n +2 /dirname/filename.csv | split -d --lines 20 - --filter='bash -c "{ head -n1 /dirname/filename.csv; cat; } > $FILE"' --additional-suffix=.txt /dirname/filename.csv_;
CommitWork();
&returncode= Exec(&cmd, %Exec_Synchronous + %FilePath_Absolute);
The command is working as expected from command line. Any help will be appreciated.