Page 1 of 1

Shell Script for putting a file on a UNIX box

Posted: Mon Sep 17, 2007 1:03 pm
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?

Posted: Mon Sep 17, 2007 3:19 pm
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