Calling a text file while executing a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Calling a text file while executing a script
# 1  
Old 10-31-2012
Data Calling a text file while executing a script

hi,

I am trying to call a text file in a shell script.

The text file has the variable defind like..

export vari_namee=/path/give/here
-------------------------------------------------
I am able to execute the shell script through putty.

But when I try to execute with informatica this script executes and in 2 seconds it fails because it tries to read the text file and the main script process gets orphan and finaling the main script fails.

I am not able to hold the main script active (process running) while calling the text file.

Please find below my code any suggestions appreciated.

Thanks,
Sunil

Code:
#!/bin/bash
#
 
. param_path.txt
 
if [ -f ${partd_srcdir}/Partd_NewSourceFileName.txt ]; then
rm ${partd_srcdir}/Partd_NewSourceFileName.txt
 
echo "removed the previous filelist file from the source directory" >> ${partd_logdir}/RMSource_FileTxt.sh_"$(date +%b%d%Y%H%M)".log
 
else
echo "No text file found" >> ${partd_logdir}/RMSource_FileTxt.sh_"$(date +%b%d%Y%H%M)".log
 
 
fi

# 2  
Old 10-31-2012
Suggestion: Instead of running the text file, you can export those variables in the calling script and re-try.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Emergency UNIX and Linux Support

Executing several commands in a text file

I have a file that has about 3000 commands , listed one below the other. I would like to execute them all in one go. Is there a simpler way to do it - like a batch file processing, than executing one line at a time? (3 Replies)
Discussion started by: ggayathri
3 Replies

2. Shell Programming and Scripting

Calling script from a RPM spec file

Hi, I want to execute a script "myscript.sh" in the %post part of a rpm spec file. Suppose the script is placed in /opt/path. Then simply calling like sh /opt/path/myscript.sh from %post part (of that spec file) will suffice? Or there is any other way? (0 Replies)
Discussion started by: saurabhkoar
0 Replies

3. Shell Programming and Scripting

calling a php file from perl script..

Hi am new to perl script .. i need some useful tutorials links to learn perl script.. and a sample script to call a php file from perl script.. thanks.. (3 Replies)
Discussion started by: senkerth
3 Replies

4. Shell Programming and Scripting

Calling Config file in the Script.. Please help

Hi Guys, I need some help related to my script... I will explain you briefly about my script and requirement I written one script which will monitor all my services in the server and send a mail to me.... There are about 10 Services(Processes) running on my services, and I have written 10... (1 Reply)
Discussion started by: Anji
1 Replies

5. Shell Programming and Scripting

need help with calling a config file in script

Hi, I am writting a script and i am using SYBASE database. i have a config file with my logging credentials. when i am calling the file via isql command its throwing me an error. see the below code. while read line do SERVER=`echo $linea |awk -F"|" ' {print $1} ' ` ... (6 Replies)
Discussion started by: dazdseg
6 Replies

6. Shell Programming and Scripting

calling a sql file in my shell script

Hi, I want to call a sql file in my shell script. see the below code:- if ] then ( isql -U${S_USER} -S${S_SERV} -w100 -b -h0 <<ENDSQL | sed -e "s/Password://" ${S_PWD} set nocount on go use ${S_DB} go // need to call a file name... (16 Replies)
Discussion started by: dazdseg
16 Replies

7. Windows & DOS: Issues & Discussions

Calling a .bat file using Korn script

Hi all, I am a very new user for korn scripting and in a process of learning. i have a .bat file that calls a .vbs file which calls a macro used to convert an excel spread sheet to .csv file... Now i want to automate this process. I want to call this bat file using a korn script or a korn... (6 Replies)
Discussion started by: bhagya2340
6 Replies

8. UNIX for Advanced & Expert Users

Calling sql file from shell script

Hi I have a shell script that call a sql file. The sql file will create a spool file. My requirement is, when ever i get an OS error like file not found. I have to log it in a log file. Could some who worked in a like scenario help me by giving the code sample. Many Thanks.. (1 Reply)
Discussion started by: chintapalli001
1 Replies

9. Shell Programming and Scripting

calling a cgi file from shell script????

Hi.. Is it possible to call a cgi program which is used to display a pop up message in the else part...On executing the script it directly prints the source code of the pop up screen.. Please if you have any idea,share with us.Thanks. #start success250=`grep -c failure... (1 Reply)
Discussion started by: elavv
1 Replies

10. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

Hi How can i dynamically read files names from a list file and execute them from a single shell script. Please help its urgent Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies
Login or Register to Ask a Question