Create directories in stagging and informatica server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Create directories in stagging and informatica server
# 8  
Old 03-06-2012
Show me exactly what you typed, please, as well as the values of the variables involved. Leaving out any of the punctuation I gave will cause it to fail, since that's what causes ssh to do multiple commands remotely instead of one remotely and one locally...
This User Gave Thanks to Corona688 For This Post:
# 9  
Old 03-06-2012
I tried these options
1.
Code:
/usr/bin/ssh  $User@boom.nwie.net "mkproj_dirs "/$Env/ecif/etl/$projectname""
 ksh: mkproj_dirs: not found

2.
Code:
/usr/bin/ssh $User@boom.nwie.net 'mkproj_dirs "/$Env/ecif/etl/$projectname"'

This just give me server login ...

---------- Post updated at 11:43 AM ---------- Previous update was at 11:39 AM ----------

Code:
./Create_proj_test.sh
 Script for creating new project in informatica
  ***********************************************************
 First creating stagging area for new project
  ************************************************************
Enter the project name:
TEST_ETL
**************************************************************
 Select the Enviornment
Choose Environment: (1-5)
  1  -DEV/DEVL
  2  -TEST/ALPHA
  3  -PREPROD/BETA
  4  -PT/SUPP
  5  -PROD/VOL
  *************************************************************

1
***************************************************************
Create directories in stagging and informatica server
  *************************************************************
Password:
ksh: mkproj_dirs:  not found
 This complete creation of New Informatica directories kindy request permission change thru ITTL for Infromatica unix directories as below
 devl = eiccdevl:ecifetld
 alpha = eicctest:ecifetla
 beta   = eiccpprd:ecifetlb
 supp = eicctest:ecifetls
 vol = eiccpprd:ecifetlp


Last edited by Corona688; 03-06-2012 at 01:43 PM.. Reason: Please use code tags for code and program output
# 10  
Old 03-06-2012
Unless this mkproj_dir program actually exists on the remote server, it can't run it on the remote server. This is why I demonstrated using shell commands over ssh, not running a remote script.

Double quotes don't work inside double-quotes. It just alternates between in-quotes and out-of-quotes like

Code:
"in quotes"out of quotes"in quotes"

What I would do for ssh is put single-quotes in double-quotes: "'${VARNAME}'" The variable will still expand locally, because it's in double-quotes. But once sent over the ssh connection, it will become 'VARIABLE CONTENTS' which will be considered as one string, and not split.

The current contents of your mkproj_dirs script would also be useful. That's where I figured the ssh calls would be -- the script calling ssh, not ssh calling the script, like you had before.
This User Gave Thanks to Corona688 For This Post:
# 11  
Old 03-06-2012
Thanks for the reply , but i did not get ur last line comment , can you pls let me know.
# 12  
Old 03-06-2012
Your original script showed you making many separate ssh calls, each running mkdir. I suggested instead that you run tar instead, to extract a tarball sent over the connection.

Now you're using ssh to run a script which I don't recognize, of unknown contents, which doesn't appear to even be installed on that server. I don't know what you're trying to do.
# 13  
Old 03-06-2012
Now i m trying to use the same function mkprojs_dirs to create directories on remote server
# 14  
Old 03-06-2012
You can't run local functions on a remote server. ssh doesn't work that way. The other side is a brand-new, independent shell, not an extension of your own. It may not even be the same shell.

Call a local function which calls ssh, not vice-versa.
This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to create automated Directories

Hi, On serverB i wish to have a script that creates ONLY & EXACTLY the same folder structure that i provide on ServerA. Thus if serverA has a folder "Output" under /opt/app/Output and has the below folders under Output Output Output/logs Output/reciever Output/data... (11 Replies)
Discussion started by: mohtashims
11 Replies

2. UNIX for Dummies Questions & Answers

Create 2 directories in one command

Hi how can i create 2 directories in two different directories ($HOME and $PWD) with 1 command? dir 1 in $HOME and dir2 in $PWD (2 Replies)
Discussion started by: chinababy
2 Replies

3. Shell Programming and Scripting

Create duplicate directories with same permissions

Hi all, I need to create duplicate directories and sub directories (only the directories not the files or file contents) with the same permissions. Can some one guide me in doing this. I could able to create but here the permissions should be the same how can i do this in linux. Thanks in... (5 Replies)
Discussion started by: Olivia
5 Replies

4. Shell Programming and Scripting

UNIX script to check file and start the informatica server

Hi Rockers, I hope u r dng good one. I have a one question is in unix with informatica . I need a unix script to check whether particular file exists in the folder , If it means we have a informatica server , so we can start the informatica server by accessing that file. Every week we have... (0 Replies)
Discussion started by: gurukrishnan
0 Replies

5. Shell Programming and Scripting

check if multiple directories exist else create missing directories

Hi , I 'm trying to check if multiple directories exist on a server, if not create the missing ones and print " creating missing directory. how to write this in a simple script, I have made my code complex if ; then taskStatus="Schema extract directory exists, checking if SQL,Count and... (7 Replies)
Discussion started by: ramky79
7 Replies

6. UNIX for Dummies Questions & Answers

Want to create 3 different new directories under the same path

Hi, Iam new to UNIX...My requirement is to create 3 dir as an hierarchy under /var/opt/temip.The output should be /var/opt/temip/GP_Int/GPTTS/AUTO. I have tried the following script...But only GP_int folder is getting created and not other folders...Can someone help??? #!/usr/bin/ksh #script... (1 Reply)
Discussion started by: Llb
1 Replies

7. UNIX for Dummies Questions & Answers

How to create shotcuts to the directories

Hi, I need your help in writing shortcuts to my directories. So that I can go into the directories with the help of shortcuts. For example: there is a directory called /home/java/webapps/project1 I want to give a shortcut as project1 . So whenever I have give cd project 1 from command line ... (3 Replies)
Discussion started by: TonySolarisAdmi
3 Replies

8. UNIX for Dummies Questions & Answers

copying directories from NT server to Unix server (solaris 5.8)

I need to copy around 30 directories (each directory include one or more text file(s)) from NT server to Unix server at one go. For doing this what are the privillages i should have in both NT and Unix server. Please let me know which command i can use in shell prompt. TIA. (4 Replies)
Discussion started by: jhmr7
4 Replies

9. Programming

Using a C program to create directories in UNIX

Aloha, I'm attempting to use a C program to create directories and then use a system call to have another program write .dat files into that directory. I understand that I could use the "system("mkdir directory_name")" function however, I would like my program to create a new directory each time... (3 Replies)
Discussion started by: aloha_boi
3 Replies

10. UNIX for Dummies Questions & Answers

How to create directories

Hi... Can any1 help me by telling me the way to create multiple directories using single command.... to create 1 directory.. mkdir is used.... :D but how to create multiple direcs. like 4 direc. i tried .... $ mkdir a; mkdir b; mkdir c; mkdir d But its 4 commands in a single... (3 Replies)
Discussion started by: abishekmag
3 Replies
Login or Register to Ask a Question