Sponsored Content
Top Forums Shell Programming and Scripting Awk script to run a sql and print the output to an output file Post 302653713 by msabhi on Sunday 10th of June 2012 05:11:59 AM
Old 06-10-2012
A basic shell script should do..use sqlplus and spool the output to a file...
 

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
Log(4)							     Kernel Interfaces Manual							    Log(4)

NAME
Log, .Log - Contains the uucp program log files SYNOPSIS
/usr/spool/uucp/.Log DESCRIPTION
The /usr/spool/uucp/.Log directories contain uucp program log files. The uucp program normally places status information about each trans- action in the appropriate log file each time you use the networking utilities facility. All transactions of the uucico and uuxqt daemons are logged in files named for the remote system concerned. The files are stored in a subdirectory of the /usr/spool/uucp/.Log directory named for the daemon involved. Thus, the log files are named with a form of the following: /usr/spool/uucp/.Log/DaemonName/SystemName The uucp and uuto commands call the uucico daemon. The uucico daemon activities for a particular remote system are logged in the System- Name file in the /usr/spool/uucp/.Log/uucico directory on the local system. The uux and uusend commands call the uuxqt daemon. The uuxqt daemon activities for a particular remote system are logged in the SystemName file in the /usr/spool/uucp/.Log/uuxqt directory on the local system. When more than one uucp process is running, however, the system cannot access the standard log file, so it places the status information in a file with a .Log prefix that covers just the single transaction. The uucp program can automatically append the temporary log files to a primary log file. This is called compacting the log files, and is handled by the uudemon.cleanu command, a shell procedure, which combines the log files of the activities of the uucico and uuxqt daemons on a system and stores them in the /usr/spool/uucp/.Old directory. The default is for the uudemon.cleanu command to save log files that are 2 days old. This default can be changed by modifying the appro- priate line in the shell script. If storage space is a problem on a particular system, reduce the number of days that the files are kept in the individual log files. The uulog command can be used to view the uucp program log files. RELATED INFORMATION
Daemons: cron, uucico(8), uusched(8) Commands: uucp(1), uudemon.cleanu(4), uulog(1), uusend(1), uuto(1), uux(1) delim off Log(4)
All times are GMT -4. The time now is 06:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy