Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
sending output to flatfile
Name: kanaka Date: April 18, 2008 at 05:55:53 Pacific OS: unix CPU/Ram: n/a Product: n/a
Comment:
Hi, I am writing one unix script to get row count of few tables into one sequential file my script is like this $ORACLE_HOME/bin/sqlplus -s <<EOF >output.txt userid/password@databasename set verify off set heading off set feedback off select count(*) count from tablel; select count(*) count from table2; select count(*) count from table3; exit; EOF
Name: lankrypt0 Date: April 21, 2008 at 06:35:47 Pacific
Reply:
I actually have a whole process that involves SQLPlus and a whole bunch of queries. I recommend sending the queries to their own files so you can just do a line count; something like this: #!/usr/bin/ksh sqlplus -s <<EOF > outfile.txt username/password@database set verify off set heading off set feedback off spool table1.csv select count(*) count from tablel; spool table2.csv select count(*) count from table2; spool table3.csv select count(*) count from table3; exit; EOF
Summary: I want to send output of my print spooler program directly to printer. Presently I am able to get the printing done on the console itself. ...
Summary: Do you know the command to print a normal file to that printer. It's probably something like: lp -potherprinter file Assuming that your C program outputs to stdout (the screen), you can pipe the outp...
Summary: Firstly, I assume you don't want to see the output from the grep? So you want to add the following to the end... >/dev/null -- sends output to nowhere 2>&1 -- sends error messages to same as output. T...