I know this isn't exactly a shell script question but I'm not sure where else to post it.
I am running a java program out of a shell script. There are times when I get an error like,
The error above isn't import in and of itself. I have a work around when this happens but I would like to get rid of the error printing to the shell.
I thought that the 2> /dev/null would dump the error printout, but I am still getting it. The --log-level off was an attempt to limit output from the program but the error messages look like they are from the jre and not the application.
Any suggestions on how to clean this up?
---------- Post updated 04-27-17 at 01:02 PM ---------- Previous update was 04-26-17 at 11:12 PM ----------
Writing to stderr is dependent on the environment of the process doing the actual write() call. A child process may possibly have a different view of what the #2 file descriptor points to.
This User Gave Thanks to jim mcnamara For This Post:
Writing to stderr is dependent on the environment of the process doing the actual write() call. A child process may possibly have a different view of what the #2 file descriptor points to.
Thanks for the input. If the errors return, I guess I will have to look into it a bit more. I actually don't think I need any of the output to the terminal because I am specifying an output file in the call. I could probably just redirect everything to /dev/null.
After a bash function is run the below file is produced:
out_name.txt tab-delimeted
Input Errors and warnings AccNo Genesymbol Variant Reference Sequence Start Descr. Coding DNA Descr. Protein Descr. GeneSymbol Coding DNA Descr. GeneSymbol Protein Descr. Genomic... (3 Replies)
I have the below two commands in my script.
tar -xf hello.tar
unzip -o tempp.zip
When i run the script i see the below on my standard out.
How can i suppress output coming from both the tar and unzip on my standard output. (3 Replies)
Hello AIX and Java gurus,
I have a java error that I have no clue how to resolve. I am trying to run the popular NMONVisualizer utility against a NMON dataset and getting the error as shown below:
/db2storage/NMON >java -jar NMONVisualizer_2015-02-02.jar com.ibm.nmon.ReportGenerator... (1 Reply)
Hi
I have a script which connects to oracle using sqlplus
if ! check_sqlplus "$ORACLE_SID" ; then
echo "Unable to use sqlplus for sid $ORACLE_SID"
return 1
else
echo "attempting to connect to database"
echo $ORACLE_HOME
echo $ORACLE_SID
echo "Status before entering... (2 Replies)
I wanna remove element from xml file, when I run the following code I get the correct output when I'm outputing to console but when I'm trying to ouptup the same code to a file I get the same / original xml file without removed element, here is the code :
import java.io.*;
import... (3 Replies)
Hi All
this is a simple script
#! /bin/bash
FileCnt=`ls -lrt $DIR/* | wc -l`
echo $FileCnt
how could i escape the error msg if there are no files in $DIR
ls: /home/sayantan/test/files/cnt/*: No such file or directory
0
Looking forward for a quick reply
Regards, Newbie (2 Replies)
Hi
I have a shell script in which a string variable is saving following query.
SqlQuery="select a||'|'||b||'|'||c from dual"
I am trying to pass above query as a parameter to some script but its giving me error for "single quote". I tried suppressing it using \' instead of just ' but it... (1 Reply)
I am using this command
find . -type f -mmin "+$t" > holder
Unfortunatley that is also printing files that begin with a period. Such as .bash_history.
What can I do to supress files that begin with a period? (1 Reply)
Hi ,
in the process of installing HBA's(IBM 6228's) for AIX 6F1 which was recently upgdared to 5.3 ML1
after the upgrade lppchk -v output displays the following.
>lppchk -v
lppchk: The following filesets need to be installed or corrected to bring
the system to a consistent state:
... (1 Reply)
I need to suppress the output to the screen. I am appending to a file so do not need the output on the screen in the CLI environment.
eg.
cat $HOME/somefile >> $HOME/anotherfile
I am doing this a number of times with SQL output files so I can look at the finished file not on the screen in the... (3 Replies)