Shell Script for putting a file on a UNIX box

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
horserider
Participant
Posts: 71
Joined: Mon Jul 09, 2007 1:12 pm

Shell Script for putting a file on a UNIX box

Post by horserider »

When my job completes on Datastage Server, I need to connect to another UNIX server and put a empty file. I can call the unix script from a routine stage in sequencer: Below are the steps I need in the UNIX SCRIPT

(1) Connect to a UNIX SERVER.
(2) Go to a particular directory.
(3) Create a .txt file.

What commands will I need to put the unix shell file to do this?
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

(1) Use ssh - You might have to setup rsa key for ssh authentication, so it does not ask for the password each time you try to log in to the remote server.
(2) cd - change directory to where you want to create the file
(3) touch a.txt - Create an empty file
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
Post Reply