Sponsored Content
Top Forums Shell Programming and Scripting Create directories in stagging and informatica server Post 302604660 by nitinmathur18 on Monday 5th of March 2012 03:13:29 PM
Old 03-05-2012
Java Create directories in stagging and informatica server

I have a function in bash script to create dir and subdir
Code:
function mkdir_stage ( )
		{
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/ 
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/archivefiles
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/dropbox
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/logfiles
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/lookupfiles
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/maestro
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/parameterfiles
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/rejectfiles
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/scriptfiles
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/sqlfiles
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/stagefiles
			mkdir -p  /webdata/ecif/etl/$Env/$projectname/targetfiles
			chmod -R 777 /webdata/ecif/etl/$Env/$projectname/
		}		
	function mkdir_informatica ( )
		{	
			mkdir -p /$Env/ecif/etl/$projectname
			mkdir -p /$Env/ecif/etl/$projectname/logfiles
			mkdir -p /$Env/ecif/etl/$projectname/dropbox
			mkdir -p /$Env/ecif/etl/$projectname/sourcefiles
			mkdir -p /$Env/ecif/etl/$projectname/scriptfiles
			mkdir -p /$Env/ecif/etl/$projectname/parameterfiles
			mkdir -p /$Env/ecif/etl/$projectname/archivefiles
			mkdir -p /$Env/ecif/etl/$projectname/targetfiles
			mkdir -p /$Env/ecif/etl/$projectname/maestro
			mkdir -p /$Env/ecif/etl/$projectname/sqlfiles
			mkdir -p /$Env/ecif/etl/$projectname/rejectfiles
			mkdir -p /$Env/ecif/etl/$projectname/lookupfiles
			mkdir -p /$Env/ecif/etl/$projectname/stagefiles
		       chmod -R 775 /$Env/ecif/etl/$projectname/
		       chmod -R 777 /$Env/ecif/etl/$projectname/dropbox
		}

But i want to reduce this further , Can someone please advice me .Thanks

Last edited by Franklin52; 03-06-2012 at 03:04 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
ssh-http-proxy-connect(1)					   User Commands					 ssh-http-proxy-connect(1)

NAME
ssh-http-proxy-connect - Secure Shell proxy for HTTP SYNOPSIS
/usr/lib/ssh/ssh-http-proxy-connect [-h http_proxy_host] [-p http_proxy_port] connect_host connect_port DESCRIPTION
A proxy command for ssh(1) that uses HTTP CONNECT. Typical use is where connections external to a network are only allowed via a proxy web server. OPTIONS
The following options are supported: -h http_proxy_host Specifies the proxy web server through which to connect. Overrides the HTTPPROXY and http_proxy environment variables if they are set. -p http_proxy_port Specifies the port on which the proxy web server runs. If not specified, port 80 is assumed. Overrides the HTTPPROXY- PORT and http_proxy environment variables if they are set. OPERANDS
The following operands are supported: http_proxy_host The host name or IP address (IPv4 or IPv6) of the proxy. http_proxy_port The numeric port number to connect to on http_proxy_host. connect_host The name of the remote host to which the proxy web server is to connect you. connect_port The numeric port number of the proxy web server to connect you to on http_proxy_host. EXAMPLES
The recommended way to use a proxy connection command is to configure the ProxyCommand in ssh_config(4) (see Example 1 and Example 2). Example 3 shows how the proxy command can be specified on the command line when running ssh(1). Example 1 Setting the proxy from the environment The following example uses ssh-http-proxy-connect in ssh_config(4) when the proxy is set from the environment: Host playtime.foo.com ProxyCommand /usr/lib/ssh/ssh-http-proxy-connect playtime.foo.com 22 Example 2 Overriding proxy environment variables The following example uses ssh-http-proxy-connect in ssh_config(4) to override (or if not set) proxy environment variables: Host playtime.foo.com ProxyCommand /usr/lib/ssh/ssh-http-proxy-connect -h webcache -p 8080 playtime.foo.com 22 Example 3 Using the command line The following example uses ssh-http-proxy-connect from the ssh(1) command line: example$ ssh -o'ProxyCommand="/usr/lib/ssh/ssh-http-proxy-connect -h webcache -p 8080 playtime.foo.com 22"' playtime.foo.com ENVIRONMENT VARIABLES
HTTPPROXY Takes the http_proxy_host operand to specify the default proxy host. Overrides http_proxy if both are set. HTTPPROXYPORT Takes the http_proxy_port operand to specify the default proxy port. Ignored if HTTPPROXY is not set. http_proxy URL format for specifying proxy host and port. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshu | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
ssh(1), ssh-socks5-proxy-connect(1), ssh_config(4), attributes(5) SunOS 5.11 24 Oct 2001 ssh-http-proxy-connect(1)
All times are GMT -4. The time now is 08:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy