Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Script to pick the files from source folder Post 302596054 by Vijay81 on Monday 6th of February 2012 10:53:54 AM
Old 02-06-2012
hi CTSGNB,

thanks for respnding.

below are the details you asked for:

env:
PHP Code:
_=/bin/env
G_BROKEN_FILENAMES
=1
HISTSIZE
=1000
HOME
=/home/wertty
INPUTRC
=/etc/inputrc
LANG
=en_US.UTF-8
LESSOPEN
=|/usr/bin/lesspipe.sh %s
LOGNAME
=wertty
LS_COLORS
=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/wertty
PATH
=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
PWD
=/opt/informatica/infa_shared/SrcFiles/logs
SHELL
=/bin/ksh
SSH_ASKPASS
=/usr/libexec/openssh/gnome-ssh-askpass
SSH_TTY
=/dev/pts/0
TERM
=xterm
USER
=wertty
_AST_FEATURES
=UNIVERSE ucb 
cat /opt/informatica/infa_shared/SCRIPTS/env_file.ksh

PHP Code:
#!/usr/bin/ksh
# Define environment variables for running Informatica workflow
#--------------------------------------------------------------
export SOURCE_FOLDER=/opt/informatica/infa_shared/SrcFiles
export TARGET_FOLDER
=/opt/informatica/infa_shared/TgtFiles
export PARM_FILES
=/opt/informatica/infa_shared/PARMS
export CACHE
=/opt/informatica/infa_shared/Cache
export LOGS
=/opt/informatica/infa_shared/SrcFiles/logs
export SESSION_LOGS
=/opt/informatica/infa_shared/SessLogs
export WORKFLOW_LOGS
=/opt/informatica/infa_shared/WorkflowLogs
export ARCHIVE
=/opt/informatica/infa_shared/SrcFiles/arch
export SCRIPT_LOGS
=/opt/informatica/infa_shared/SrcFiles/script_logs
export TEMP
=/opt/informatica/infa_shared/Temp
export SCRIPTS
=/opt/informatica/infa_shared/SCRIPTS
export WORK
=/opt/informatica/infa_shared/SrcFiles/work
#----------------------------------------------------------------
# Database credentials
#----------------------------------------------------------------
export ORACLE_HOME=
export ORACLE_DB=ERDW_DEV
export ORACLE_USERNAME
=resdt
export ORACLE_PASSWORD
=opiutn3 
My database is ORACLE.


I am on LINUX.

Data_Files and control files variables can have no values.. it is not a must that they should have values.. means it a valid scenario not to have files in the directory.But at the same time, I want to get rid of the message that says
ls: FERAL_DATA_*_20121213.FERAL_DAT.TXT: No such file or directory
ls: FERAL_CONTROL_20121213.FERAL_CTRL.TXT: No such file or directory
thanks!


Last edited by Vijay81; 02-06-2012 at 02:04 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Suppres error message when moving files from empty source folder

Hi, I would like to write a shell script that moves files from one folder to another without retrieving the error 'can not acces/find file or folder' when the source folder is empty. Any ideas, Thx in advance, Steven. (2 Replies)
Discussion started by: Steven
2 Replies

2. Shell Programming and Scripting

Script to pick out files from a file which are older than 15 days

Hi , I have a file abc.txt which actually contains a directory and file list -rwxrwxr-x 1 dmadmin mmasapp 334 Dec 03 2001 aafs_006.ksh -rwxrwxr-x 1 dmadmin mmasapp 1270 Nov 13 2001 mcl_deposit_ftp.ksh -rwxrwxr-x 1 dmadmin mmasapp 925 Oct 31 2001 ... (1 Reply)
Discussion started by: viv1
1 Replies

3. Shell Programming and Scripting

script for Finding files in a folder and copying to another folder

Hi all, I have a folder '/samplefolder' in which i have some files like data0.txt, data1.txt and data2.txt. I have to search the folder for existence of the file data0.txt first and if found have to copy it to some other file; next i have to search the folder for existence of file... (5 Replies)
Discussion started by: satish2712
5 Replies

4. Shell Programming and Scripting

Running a script with all files in a folder

Hi I have many files in a folder (like 200) and I want to run a Perl script through all of them. One way would be to do it one by one (which will take forever). But I am sure there is a faster way of doing it. So inside the folder i have files named in no particular way eg. YUI456... (3 Replies)
Discussion started by: phil_heath
3 Replies

5. UNIX for Dummies Questions & Answers

Script for checking the files in a folder

Hi , I am using the below script for checking for a file in a folder. if ; then echo 0 else echo 1 fi Is there any way we can check for files which are starting with GL*.csv.What I am trying to do is , I have to check in a folder for the GL*.csv files if there are any files they I... (6 Replies)
Discussion started by: wangkc
6 Replies

6. Shell Programming and Scripting

Need script using cp to transfer files to another folder

Hi guys , how are you doing? I am tryng to make a script using cp that i would like to do this: echo "Enter the name files to tranfer" then user has to enter via keyboard this kind of output file1 file 2 file 3 file x (i mean the number of the files could vary and their name too)... (1 Reply)
Discussion started by: REX:)
1 Replies

7. Shell Programming and Scripting

need a shell script to extract the files from source file and check whether those files existonserve

Hi, I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is # echo $0 -sh My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Discussion started by: muraliinfy04
13 Replies

8. Shell Programming and Scripting

Pick files after specified Time from a folder in Perl

Hi All I am stuck in a problem and wants help What i want to do is I have a directory(say name of that directory is outdir) In that directory(outdir) the files come after some gap of time by some processes. What i want to do is i want to list all the files in that directory after the given... (2 Replies)
Discussion started by: parthmittal2007
2 Replies

9. UNIX for Dummies Questions & Answers

Script to delete files in different folder

Hi Experts, i need a little help. i have different folder that contain files that need to be deleted. but those folder contains huge amoung of same with 3 different extention. what i used to do is to delete them using the rm commande rm *.ext *.ext1 *.ext3 what i want to do is to have... (1 Reply)
Discussion started by: yprudent
1 Replies

10. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy