cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute a Unix command in snaplogic

venkat475
New Contributor

I would like to execute this unix command in snaplogic to convert the csv file so could you please help me to get this done 

 

awk -F'"' -v OFS='' '{ for (i=2; i<=NF; i+=2) gsub(",", "", $i) } 1' input.csv > output.csv

 

3 REPLIES 3

AleksandarAngel
Contributor III

Hello @venkat475,

I'm not sure but, this might be also possible to be achieved using SnapLogic expressions and parsing / formatting workarounds.

However if you have no other option, then you can use the Script Snap and the subprocess Python module to execute UNIX command directly on the Snaplex Node.

Regards,

Aleksandar.

Could you please provide the sample script snap how to include the python code within the existing python code which is there script snap

Attached below is a sample pipeline, where the command is defined as a Pipeline Parameter.

Please let me know if this helps you!

Regards,

Aleksandar.