![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| search for a file - errors redirected | matrixmadhan | AIX | 1 | 07-18-2005 01:12 AM |
| redirected output | slavam | Shell Programming and Scripting | 2 | 10-12-2004 10:47 AM |
| tail -f a log file redirected into a new window? | douknownam | Shell Programming and Scripting | 2 | 06-01-2004 01:34 PM |
| Standard output not redirected from /bin/sh | soorajmu | UNIX for Dummies Questions & Answers | 1 | 09-19-2003 07:47 AM |
| Saving a redirected file | JSP | UNIX for Dummies Questions & Answers | 1 | 09-27-2001 03:52 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
redirected output not going to file for all cases
I have to confirm that an engine was not able to run. In the output below you see that it indeed got errors, but it didn't send those messages to the output file. When I run the same thing with a different executable it works. So does this mean something in the executable could cause it not to go to the output file??
$ cd Tar $ ./Engine > ../engine_output.txt exec(): 0509-036 Cannot load program ./Engine because of the following errors: 0509-150 Dependent module libodbc.a(libodbc.so.1) could not be loaded. 0509-022 Cannot load module libodbc.a(libodbc.so.1). 0509-026 System error: A file or directory in the path name does not exist. $ cd .. $ cat engine_output.txt $ ls AIX_50_ODBC_test.sh engine.tar engine_result.txt Tar engine_output.txt $ |
| Forum Sponsor | ||
|
|
|
||||
|
I disagree:
Code:
#!/bin/ksh # # test.sh : demonstrate redirection # # echo "I am stdout" echo "I am stderr" >&2 Code:
# ./test.sh > log1 I am stderr # cat log1 I am stdout Code:
# ./test.sh 2>&1 > log2 I am stderr # cat log2 I am stdout Code:
# ./test.sh > log3 2>&1 # cat log3 I am stdout I am stderr |
|
|||
|
This works for all my normal executions. But on one machine, a coredump is expected on one command. We don't care, just need to confirm the version info. This is output from the exe:
$ ./Up -*-*- XXXXXXX UPDATE XXXXX Version nnnnnnnn -*-*- -*-*- Copyright (C) 1998-2007 xxxxxxxxxxxxxx, Inc. -*-*- Processing begins: 10/4/2007 10:48:12 Tracking Database Connect Error Memory fault(coredump) However, when I send the output to a file, the output file is empty: $ ./Up > ../Up_output.txt 2>&1 Memory fault(coredump) $ cd .. $ cat Up_output.txt $ |
| Thread Tools | |
| Display Modes | |
|
|
|
The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
|
| 421 service not available, remote server has closed connection ^m automate ftp autosys awk trim bash eval bash for loop boot: cannot open kernel/sparcv9/unix command copy/move folder in unix couldn't set locale correctly curses.h cut command in unix find grep find mtime find null character in a unix file grep multiple lines grep or grep recursive hp-ux ifconfig inaddr_any inappropriate ioctl for device lynx javascript mailx attachment mget mtime ping port remove first character from string in k shell replace space by comma , perl script rsync ftp scp recursive segmentation fault(coredump) sftp script snoop unix solaris change ip address stale nfs file handle syn_sent tar exclude tar extract to folder test: argument expected unix unix .profile unix forum unix forums unix internals unix interview questions unix mtime unix simulator unix.com vi substitute while loop within while loop shell script |