Need to Output result to a non-delimitted file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to Output result to a non-delimitted file
# 1  
Old 04-07-2008
Need to Output result to a non-delimitted file

Hello I need to run an sql script and then the output result to be in non-delimitted file

What is the execution command to obtain this.


For eg: the following outputs the result to a space delimitted file
db2batch -d ${EC_DB2_DBNAME} -f ${TMP_SCRIPT_NAME} -a ${CURR_DB_ID}/${CURR_DB_PWD} -r ${OUTPUT_FILE_DIR}/${OUTPUT_FILE_NAME}.${OUTPUT_FILE_EXT} >> ${LOG_FILE}
# 2  
Old 04-07-2008
non-delimited file ?

do you want to remove the delimiters ?

Code:
sed 's/ //g' input > output

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep output to file result not as expected

Hi Gurus, I run command grep ABC file1 > file2 against below file. I got all ABC_xxx in one line in file2. I expect to get multiple lines in file2. If I print result in screen, the result is expected. thanks in advance My os is SunOS 5.10 Generic_150400-64 sun4v sparc sun4v ABC_123 XXXXX... (2 Replies)
Discussion started by: green_k
2 Replies

2. Shell Programming and Scripting

How to list files names and sizes in a directory and output result to the file?

Hi , I'm trying to list the files and output is written to a file. But when I execute the command , the output file is being listed. How to exclude it ? /tmp file1.txt file2.txt ls -ltr |grep -v '-' | awk print {$9, $5} > output.txt cat output.txt file1.txt file2.txt output.txt (8 Replies)
Discussion started by: etldeveloper
8 Replies

3. Shell Programming and Scripting

Output block of lines in a file based on grep result

Hi I would appreciate your help with this. I have a output file from a command. It is broken based on initial of the users. Exmaple of iitials MN & SS. Under each section there is information pertaining to the user however each section can have different number of lines. MY challenge is to ... (5 Replies)
Discussion started by: mnassiri
5 Replies

4. Shell Programming and Scripting

How to output thre result to a text file?

Dear All I have a script file like the following: ..... ..... Variable_1 = 888 Variable_2 = 999 ..... MyExternalProgram Myfile ..... The line MyExternalProgram Myfile will generate some number, Say 777 Now I hope I can output the result of above codes to a text file,... (2 Replies)
Discussion started by: littlewenwen
2 Replies

5. Shell Programming and Scripting

Write result to output file

Good morning everybody, Beeing an absolute newbie in shell scripting I would like to look for some help here. I would like to read an external text file and format the data and write it to an output file. What I was trying to do was to display the result (this worked). But now I... (1 Reply)
Discussion started by: bluejean1976
1 Replies

6. UNIX for Advanced & Expert Users

Output the SQL Query result to a File

Hello Guys, This message is somewhat relates with last thread. But I need to re-write thing. I start over a little. I am stuck now and need your help. Here is my script- #! /bin/ksh export ORACLE_HOME=/opt/oracle/app/oracle/product/9.2 /opt/oracle/app/oracle/product/9.2/bin/sqlplus -s... (5 Replies)
Discussion started by: thepurple
5 Replies

7. Shell Programming and Scripting

Way to save output result of a program into another new file...

Does anybody know any alternative way to save output result of a program into another new file? I got try the command below: program_used input_file > new_output_file program_used input_file >> new_output_file Unfortunately, both the ">" and ">>" is not work at this case to save the output... (6 Replies)
Discussion started by: patrick87
6 Replies

8. Shell Programming and Scripting

Read multiple log files and create output file and put the result

OS : Linux 2.6.9-67 - Red Hat Enterprise Linux ES release 4 Looking for a script that reads the following log files that gets generated everynight between 2 - 5am Master_App_20090717.log Master_App1_20090717.log Master_App2_20090717.log Master_App3_20090717.log... (2 Replies)
Discussion started by: aavam
2 Replies

9. Shell Programming and Scripting

delimitted file to fixed length file

Hi, Iam new to unix. I have a variable length file seperated by delmitter "~", I need to change it to fixed length file including space instead of delimitter. To be clear..... Input file: Row-id name 123~name1 124~name2 125~name3 The above input file is a variable length file... (2 Replies)
Discussion started by: manneni prakash
2 Replies

10. 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
Login or Register to Ask a Question