Execute the Output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute the Output
# 1  
Old 03-20-2007
Execute the Output

I am developing a shell script to dynamically generate the DMLs (for hundreds of SQL/Tables) using the gendml command. I want to pass the output of this program(gen_dml.ksh) to a shell and execute it. Can yo give some inputs?

#!/bin/ksh
#Program name :=gen_dml.ksh
echo m_db gendml oracle.dbc -select "'"`cat dim_calendar.sel.sql`"'" > dim_calendar.dml

Regards,
Kousikan
# 2  
Old 03-20-2007
Quote:
Originally Posted by kousikan
I am developing a shell script to dynamically generate the DMLs (for hundreds of SQL/Tables) using the gendml command. I want to pass the output of this program(gen_dml.ksh) to a shell and execute it. Can yo give some inputs?

#!/bin/ksh
#Program name :=gen_dml.ksh
echo m_db gendml oracle.dbc -select "'"`cat dim_calendar.sel.sql`"'" > dim_calendar.dml

Regards,
Kousikan
Code:
echo m_db gendml oracle.dbc -select "'"`cat dim_calendar.sel.sql`"'" | sh

# 3  
Old 03-21-2007
Thanks a lot
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute awk output with continuous streaming input

I need to parse some continuous output from a program (i.e. aScript.py) into a portal that uses curl. I've written a simple awk one-liner to parse the information that is output from aScript.py, but I'm not able to execute it. I can succeed with just one line of the output from aScript.py: echo... (2 Replies)
Discussion started by: jm4smtddd
2 Replies

2. Shell Programming and Scripting

How to execute command remotely as sudo and save the output locally?

Hello , I am trying to run a NetBackup command in remote server. Also this command can only be run by root so I am using sudo . Also I want the output of the command locally in a file. The below command asked for password , ran successfully and showed Output on my local server screen ... (2 Replies)
Discussion started by: rahul2662
2 Replies

3. Shell Programming and Scripting

Execute python file, FTP output to another server

Greetings all, We are implementing a new tool called URLwatch which is a python utility. Here are the requirements. 1) Run every 10 seconds 2) Execute the python script 3) Output file gets generated, FTP it to a differernt server I gave no idea how to do this and management needs a demo... (3 Replies)
Discussion started by: jeffs42885
3 Replies

4. Shell Programming and Scripting

How to execute standard output ?

Alright so i got this script genpipe: echo "$*" |sh genscript file vi file << 'HERE' :%s/^/echo /g :%s/ $//g :%s/ /&\| xargs \.\/plus /g :wq HERE cat file Which generates output like echo 1 | xargs ./plus 2 | xargs ./plus 3 and so on Now i got the next script multiplus, who should... (3 Replies)
Discussion started by: Bertieboy7
3 Replies

5. Shell Programming and Scripting

Execute stored procedure through script in sybase database and store the output in a .csv file

Hi, I have a sybase stored procedure which takes two input parameters (start_date and end_date) and when it get executed, it gives few records as an output. I want to write a unix script (ksh) which login to the sybase database, then execute this stored procedure (takes the input parameter as... (8 Replies)
Discussion started by: amit.mathur08
8 Replies

6. Shell Programming and Scripting

Execute the Output Lines.

Hi, My Script looks like this #! /bin/ksh cd /usr/SrcFiles/ADD; while read line do d=`echo $line|cut -d'.' -f1` echo $d".XML" >> XML_File_List.txt out=`echo "gunzip -c -S .ZIP $d.ZIP > $d.XML;"` echo $out per=`echo "chmod ugo+rwx $d.XML;"` echo $per done <ZIP_File_List.txt and the... (5 Replies)
Discussion started by: naveen.kuppili
5 Replies

7. Shell Programming and Scripting

Execute output lines

I have a command (not shell script) that general several lines of output like this... scp /var/lib/mysql/jitu/email.* root@172.29.0.218:/root/pitu/ scp /var/lib/mysql/jitu/orders.* root@172.29.0.218:/root/pitu/ I tried adding xargs but it did not work. -exec was not tried because I guess it... (3 Replies)
Discussion started by: shantanuo
3 Replies

8. Shell Programming and Scripting

Execute command created from sql output

Hi, I've would like to create kill statement from sqlplus output. So, I've modified somoene's script : mud_kill_stmt=`sqlplus -s / as sysdba <<EOF select 'kill -9 ' || p.SPID || ';' statement from $process_view p, $session_ ......... and so on exit; EOF` $mud_kill_stmt | tr ... (1 Reply)
Discussion started by: Arkadiusz Masny
1 Replies

9. Shell Programming and Scripting

Execute the output of one liner print

Hello I wrote simple one liner that take RunTime *.exe and link them to the output of the compilation output: find ~/DevEnv/. -name "*.exe" | xargs ls -l | awk '{ x=split($9,a,"/"); print "ln -s " $9 " "a}' and it gives me the desire output , but how can I execute this ln command on every... (1 Reply)
Discussion started by: umen
1 Replies

10. UNIX for Dummies Questions & Answers

output and execute

hi, does this mean that the output will go to a file named $3 with an x in the end, and then it will be executed? grep $1 filename > $3x chmod a+x $3x $3x thanks (2 Replies)
Discussion started by: gammaman
2 Replies
Login or Register to Ask a Question