![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to extract paragraphs from file in BASH script followed by prefix ! , !! and !!! | nabmufti | Shell Programming and Scripting | 6 | 02-09-2008 08:32 PM |
| Script that extract some lines from a file lookin into another | heartwork | Shell Programming and Scripting | 7 | 01-25-2008 06:57 AM |
| compare file size from a output file from a script | moustik | Shell Programming and Scripting | 7 | 11-07-2007 10:17 AM |
| Extract text in 2 columns of output file. | Danish Shakil | Shell Programming and Scripting | 2 | 10-19-2007 11:03 AM |
| Script to Extract the line from File with specified offset | thinakarmani | UNIX for Advanced & Expert Users | 5 | 05-04-2006 06:50 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to extract output from a script to .xls file
Hi,
I am running a script, the output of which is needed to be filled in .xls file. I am doing this manually now, i mean I am writing the output of the script to Excel file manually. How to redirect the output of the script to .xls file? Please help me out!!! Thanks much, Scriptlearner. |
|
||||
|
You mean you are copying outputs from the screen to an excel file?
You can format your outputs in CSV format (like lorcan suggested) and redirect the script out to a file say, $ sh your_script.sh > your_output.csv does that help? |
|
||||
|
Hi,
Thanks a lot. Yep,it works if I am extracting output from .sh file. Actually I have one shell script i.e myscripts.sh, in which it calls other .sql scripts which are in my home directory. Actually I wanted the output of .sql scripts to .csv file. I tried to get the output of .sql to .csv, but it is throwing error. Can I redirect the output from myscripts.sh to myouput.csv?Is that possible? Please help me. Thanks much in advance, Scriptlearner. |
|
||||
|
You cannot redirect the SQL queries to the files. Instead you can use the spool concept in ORACLE (hope Oracle is the database).
Spool your output such that the records are comma separated. something like the below; Code:
select sysdate||","|| sysdate from dual; spool on; / spool off; |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|