ftp - write ls or dir to file while ftp'ing

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
a2love
Participant
Posts: 30
Joined: Fri Feb 09, 2007 10:03 am

ftp - write ls or dir to file while ftp'ing

Post by a2love »

Executing a batch job through execute command. Was having an issue with the batch where I need to check if FTP was successful by reading the ls or dir, and send that list to a file, then use grep on that file to find my required file name. Any suggestions? slightly out of the DS realm but any help is appreciated.
Adam Love
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

When you invoke your ftp script, redirect its output or pipe its output through the tee -acommand.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply