In your OP you wrote "File validation logic available in below UNIX script". That means your support team do allow it, do,'t they? If the script is there, just call it from DS.
If you want to write the same logic in DS, you'll have to replace every shell variable by an equivalent DS global variable (don't forget the initial $-character) and call every single command line from the exec function.