03-01-2006
...or how about...
nohup ./my_program >/dev/null 2>error.log &
that is, if you don't care about standard output... but just wanna see stderr messages.
if you intend to do this a lot... or permanently with this script, you may want to consider adding within the script something like this:
exec 1>/dev/null
exec 2>error.log (or exec 2>&1 if you want no output at all)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Maybe it's an stupid question but remeber... I'm Junior..
I use command line to run programs, and some of them gives a lot of information when, for example, you open a window or other actions. That's really bad because my terminal gets full of unwanted messages, so I use "bin file & >/dev/null"... (1 Reply)
Discussion started by: piltrafa
1 Replies
2. Solaris
Hi, Anyone can help
My solaris 8 system has the following
/dev/null , /dev/tty and /dev/console
All permission are lrwxrwxrwx
Can this be change to a non-world write ??
any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies
3. AIX
I am trying to find a way to do the following on an AIX 4.2 with Korn:
tar cvfpdl - . | compress > /dev/rmt0
The /dev/rmt0 is the device we use when we tar directly to it.
I want to compress a folder's content to tape. Our current TAR does not have compression at all. We only have... (5 Replies)
Discussion started by: Browser_ice
5 Replies
4. Shell Programming and Scripting
Hello,
I'm trying to send the error output of a 'cat' operation to /dev/null like this:
cat /dirA/dirB/temp*.log > /dirA/dirB/final.log 2>/dev/null
This works perfectly in a terminal, but not when placed in a script.
If there are no files matching temp*.log the script outputs an error... (7 Replies)
Discussion started by: Nils88
7 Replies
5. UNIX for Dummies Questions & Answers
How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&"
echo "hello" > /dev/null 2>&1
echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies
6. HP-UX
Hi Guru's,
I am trying to test the network speed or load by this command.
but getting error " Not Connected ". Could you guys please help.
ftp> put "|dd if=/dev/zero bs=8k count=1000000" /dev/null
Not connected.
Please use
code tags! (9 Replies)
Discussion started by: sris.sun
9 Replies
7. Shell Programming and Scripting
I apologize if this question has been answered else where or is too elementary.
I ran across a KSH script (long unimportant story) that does this:
if ; then
CAS_SRC_LOG="/var/log/cas_src.log 2>&1"
else
CAS_SRC_LOG="/dev/null 2>&1"
fithen does this:
/usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies
8. UNIX for Dummies Questions & Answers
I am trying to eliminate an error message from a script. This is the error message:
find: stat() error /usr/openv/netbackup/db/images/KUMAX: No such file or directory
if ];
then
runthiscommand=`su nxadm -c "ssh -t $new3 exec /bin/sh -s">/tmp/filew3 2>/tmp/error.txt<<EOF
... (1 Reply)
Discussion started by: newbie2010
1 Replies
9. UNIX for Dummies Questions & Answers
Hello.
When I run a .ksh that contains the command below, and there is no file available in the source location the "FILE_NAME_*.CSV not found" error is still being displayed.
FILEN=$(ssh ${SOURCE_SERV} "cd ${SOURCE_LOCATION} ;ls ${FILES}") 2> /dev/null.
This is interfering with the rest... (4 Replies)
Discussion started by: jimbojames
4 Replies
10. Shell Programming and Scripting
Friends have the following problem
a search may not find anything which would correct example:
ls -ltr *prueba.txt | nawk '{ print $9 }' > Procesar.dat 2>/dev/null
When he finds nothing gives me the following error
ls: prueba.txt: No such file or directory
because 2> / dev / null... (4 Replies)
Discussion started by: tricampeon81
4 Replies
LEARN ABOUT OPENSOLARIS
gpg-error-config
gpg-error-config(1) User Commands gpg-error-config(1)
NAME
gpg-error-config - helper script for building with libgpg-error
SYNOPSIS
gpg-error-config [--version] [--prefix=dir] [--cflags] [--libs] [--exec-prefix=dir]
DESCRIPTION
The gpg-error-config tool is used to determine the compiler and linker flags that should be used to compile and link programs that use the
libgpg-error library.
OPTIONS
The following options are supported:
--cflags Print the compiler flags that are necessary to compile a program using the specified library.
--exec-prefix=dir If specified, use dir instead of the exec installation prefix that the library was built with, when computing the
output for the --cflags and --libs options. This option must be specified before any --libs or --cflags options.
--libs Print the linker flags that are necessary to link with the specified library.
--prefix=dir If specified, use dir instead of the installation prefix that the library was built with, when computing the output
for the --cflags and --libs options. This option must be specified before any --libs or --cflags options. This
option is also used for the exec prefix if the --exec-prefix option is not specified.
--version Print the currently installed version of the library on the standard output.
EXAMPLES
Example 1: Getting the libgpg-error library version
example% gpg-error-config --version
Example 2: Determining the libraries required to link with the libgpg-error library
example% gpg-error-config --libs
EXIT STATUS
The following exit values are returned:
0 Application exited successfully
>0 Application exited with failure
FILES
The following files are used by this application:
/usr/bin/gpg-error-config Executable for libgpg-error helper script
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgpg-error |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
gpg-error(1), libgpg-error(3), pkg-config(1), attributes(5)
Written by Jeff Cai, Sun Microsystems Inc., 2008.
SunOS 5.11 10 Jan 2008 gpg-error-config(1)