Sponsored Content
Top Forums Shell Programming and Scripting Awk script to run a sql and print the output to an output file Post 302653653 by frank_rizzo on Saturday 9th of June 2012 04:55:02 PM
Old 06-09-2012
Why would you want to run it via awk? That sounds harder than it needs be. You can use the system() function to run your external sql call.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

any possible to run sql result and output to file

Hi, I search all post...and no soluation about..if i would like to run a sql statement and output the result to txt file. for example, i usually run "sql" to logon the database and run select statement. Then I need to copy the output into the result.txt. Can I run the script to do this... (7 Replies)
Discussion started by: happyv
7 Replies

2. UNIX for Dummies Questions & Answers

using awk or sed to print output from one file

dear i have one file regarding >abshabja>sdksjbs>sknakna>snajxcls so i want to be output like >abshabja >sjkabjb >sknakna >snajxcls Any using awk or sed will help thanks (2 Replies)
Discussion started by: cdfd123
2 Replies

3. Shell Programming and Scripting

Run SQL queries in DB2 and output to file

Hi, I new to Unix and scripting. Following is my requirement. Can someone tell me whether its possible or not. Also please let me know how to proceed further if this is possible. List of queries are stored in a file. For example, I have to run a query like this: Select * from &XYZ where... (0 Replies)
Discussion started by: simhasuri
0 Replies

4. Shell Programming and Scripting

To parse through the file and print output using awk or sed script

suppose if u have a file like that Hen ABCCSGSGSGJJJJK 15 Cock ABCCSGGGSGIJJJL 15 * * * * * * : * * * . * * * : Hen CFCDFCSDFCDERTF 30 Cock CHCDFCSDHCDEGFI 30 * . * * * * * * * : * * :* : : . The output shud be where there is : and . It shud... (4 Replies)
Discussion started by: cdfd123
4 Replies

5. Shell Programming and Scripting

SQL Script's output to a CSV file

I need to call and execute an SQL script within a KSH script and get the output/extracted data into a CSV file. Is there any way to get the out put in a CSV file other than spooling ? I tried spooling. Problem is if there is any wrning/comment/Error they all will be spooled into the csv file. I... (4 Replies)
Discussion started by: Sriranga
4 Replies

6. Shell Programming and Scripting

awk command : To print the output to a file

half of the problem is already solved with the help of bartus11 suggestion I have a txt file having rows and coulmns, i want to perform some operation on a specific coulmn starting from a specific line. 50.000000 1 1 1 1000.00000 1000.00000 ... (5 Replies)
Discussion started by: shashi792
5 Replies

7. Shell Programming and Scripting

Run a program-print parameters to output file-replace op file contents with max 4th col

Hi Friends, This is the only solution to my task. So, any help is highly appreciated. I have a file cat input1.bed chr1 100 200 abc chr1 120 300 def chr1 145 226 ghi chr2 567 600 unix Now, I have another file by name input2.bed (This file is a binary file not readable by the... (7 Replies)
Discussion started by: jacobs.smith
7 Replies

8. Shell Programming and Scripting

awk script to search output for a value and print

GOODNUMBERS="1 2 3 4 5 6 3 3 34 34 5 66 12" BADNUMBERS="7 3 12 5 66" for eachnum in `echo ${GOODNUMBERS}` do echo ${BADNUMBERS} | gawk -v threshold=${eachnum} '$1 != threshold' done what im trying to do with the above is, i want to print numbers that are in the GOODNUMBERS... (10 Replies)
Discussion started by: SkySmart
10 Replies

9. Shell Programming and Scripting

awk to print field from lookup file in output

The below awk uses $3 and $4 in search as the min and max, then takes each $2 value in lookup and compares it. If the value in lookupfalls within the range in searchthen it prints the entire line in lookup/ICODE]. What I can't seem to figure out is how to print the matching $5 from search on that... (4 Replies)
Discussion started by: cmccabe
4 Replies

10. Shell Programming and Scripting

Run sql query in shell script and output data save as delimited text

I want to run sql query in shell script and output data save as delimited text (delimited text would be comma) Code: SPOOL_FILE=/pgedw/dan.txt SQL=/pgedw/dan.sql sqlplus -s username/password@myhost:port/servicename <<EOF set head on set COLSEP , set linesize 32767 SET TRIMSPOOL ON SET... (8 Replies)
Discussion started by: Jaganjag
8 Replies
RPLAY(1)						      General Commands Manual							  RPLAY(1)

NAME
rplay - play, pause, continue, and stop sounds SYNOPSIS
rplay [options] [sound ...] DESCRIPTION
rplay is client that communicates with rplayd to play, pause, continue, and stop sounds using both the RPLAY and RPTP protocols. Sound files can be played by rplayd directly if available on the local system or sounds can be sent over the network using UDP or TCP/IP. rplay will attempt to determine whether or not the server has the sound before using the network. OPTIONS
-b BYTES, --buffer-size=BYTES Use of a buffer size of BYTES when playing sounds using RPTP flows. The default is 8K. -c, --continue Continue sounds. -n N, --count=N Number of times to play the sound, default = 1. -N N, --list-count=N Number of times to play all the sounds, default = 1. --list-name=NAME Name this list NAME. rplayd appends sounds with the same NAME into the same sound list -- it plays them sequentially. --help Display helpful information. -h HOST, --host=HOST, --hosts=HOST Specify the rplay host, default = localhost. -i INFO, --info=INFO Audio information for a sound file. This option is intended to be used when sounds are read from standard input. INFO must be of the form: `format,sample-rate,bits,channels,byte-order,offset' Examples: ulaw,8000,8,1,big-endian,0 gsm,8000 Shorthand info is provided for Sun's audio devices using the following options: --info-amd, --info-dbri, --info-cs4231. There's also: --info-ulaw and --info-gsm. -p, --pause Pause sounds. --port=PORT Use PORT instead of the default RPLAY/UDP or RPTP/TCP port. -P N, --priority=N Play sounds at priority N (0 <= N <= 255), default = 0. -r, --random Randomly choose one of the given sounds. --reset Tell the server to reset itself. --rplay, --RPLAY Force the use of the RPLAY protocol. The default protocol to be used is determined by checking whether or not the server has local access to the specified sounds. RPLAY is used when sounds are accessible, otherwise RPTP and possibly flows are used. RPLAY will also be used when sound accessibility cannot be determined. --rptp, --RPTP Force the use of the RPTP protocol. See `--rplay' for more information about protocols. -R N, --sample-rate=N Play sounds at sample rate N, default = 0. -s, --stop Stop sounds. --version Print the rplay version and exit. -v N, --volume=N Play sounds at volume N (0 <= N <= 255), default = 127. SEE ALSO
rplayd(8), rptp(1) 6/29/98 RPLAY(1)
All times are GMT -4. The time now is 10:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy