Sponsored Content
Top Forums Shell Programming and Scripting Error output of cat to /dev/null Post 302493935 by aix-guy on Friday 4th of February 2011 08:29:32 AM
Old 02-04-2011
you could try and send the error of the cat to null
Code:
cat /dirA/dirB/temp*.log 2>/dev/null > /dirA/dirB/final.log 2>/dev/null

or you could trap all standard error out to null
Code:
MY_ERR="/dev/null"
exec 2>$MY_ERR

cat /dirA/dirB/temp*.log > /dirA/dirB/final.log
rm /dirA/dirB/temp*.log


Last edited by Scott; 02-05-2011 at 08:30 AM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

error piping nohup to /dev/null

Hi, I have a script as follows: #!/bin/sh nohup ./my_program >& /dev/null & However, i get a "Generated or received a file descriptor number that is not valid" whenever I run it. running the command up in prompt is ok though. if i change the first line to #!/bin/csh i get a then:... (4 Replies)
Discussion started by: mochi
4 Replies

2. Solaris

URGENT - setup port and dump all output to /dev/null or a file

Please help urgently. I need to setup up some sort of service on a solaris server on a port. I dont need it do anything special, anything that is sent to this port from an external server should be dump to /dev/null or a flat file.. Can you help urgently? (1 Reply)
Discussion started by: frustrated1
1 Replies

3. Solaris

What is /dev/tty /dev/null and /dev/console

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

4. UNIX for Dummies Questions & Answers

cat /dev/null

Hi, Excuse my ignorance here - I'm a networks man and my knowledge of all things unix is somewhat limited. We have a very large file (/var/tmp/mond.log) that we need to zero - does the "cat /dev/null > /var/tmp/mond.log" command achieve this? (4 Replies)
Discussion started by: freakydancer
4 Replies

5. UNIX for Dummies Questions & Answers

cp output /dev/null results in not a directory

Hello, I am working on a script to measure the read performance of a busybox environment. The logical choice is to use a command line like: (time cp * /dev/null) 2> /tmp/howlong.txt Ah, the rub is cp or /dev/null will only accept a single file at a time. The result in the txt file is and... (1 Reply)
Discussion started by: stevesmo
1 Replies

6. Ubuntu

tar not reading if output directed to /dev/null

I stumbled across a somewhat strange behavior of tar and find no explanation for it: i was testing a DVD for read errors and thought to simply tar the content and direct the output to /dev/null: tar -cvf - /my/mountpoint/*ts > /dev/null This way i expected the system to read the complete... (4 Replies)
Discussion started by: bakunin
4 Replies

7. UNIX for Dummies Questions & Answers

/dev/null 2>&1 Versus /dev/null 2>1

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

8. HP-UX

/dev/Null error

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

9. Shell Programming and Scripting

Redirecting standard out to /dev/null goes to file "/dev/null" instead

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

10. Shell Programming and Scripting

redirect the audio output to /dev/null

I'm using an text-to-speech synthesis in a script, and I need to redirect it's output to /dev/null how can I do that ? And how to redirect the stream to his normal output then (sound card ) ? thankx (2 Replies)
Discussion started by: firelink
2 Replies
xchkdmp(8)					       JFS utility - dump fsck.jfs log file						xchkdmp(8)

NAME
xchkdmp - dump the contents of a JFS fsck log file created with xchklog SYNOPSIS
xchkdmp [ -f input.file ] [ -V ] DESCRIPTION
xchkdmp dumps the contents of a JFS fsck log file that was created by JFS utility xchklog. If no input file is specified, the default path and file name (<pwd>fscklog.new) is used. The output is written to standard out. OPTIONS
-f input.file Specifies the input file name and path. input.file must be 127 characters or less in length. input.file will be read from the present working directory unless it is fully qualified. -V Print version information and exit (regardless of any other chosen options). EXAMPLES
Dump the contents of the fsck service log in <pwd>fscklog.new: xchkdmp Dump the contents of the fsck service log in /temp/l9651107.log: xchkdmp -f /temp/l9651107.log REPORTING BUGS
If you find a bug in JFS or xchkdmp , please report it via the bug tracking system ("Report Bugs" section) of the JFS project web site: http://oss.software.ibm.com/jfs Please send as much pertinent information as possible, including any xchkdmp error messages and the complete output of running fsck.jfs with the -v option on the JFS device. SEE ALSO
xchklog(8), mkfs.jfs(8), fsck.jfs(8), logdump(8), logredo(8), xpeek(8) AUTHOR
Barry Arndt (barndt@us.ibm.com) xchkdmp is maintained by IBM. See the JFS project web site for more details: http://oss.software.ibm.com/jfs January 11, 2001 xchkdmp(8)
All times are GMT -4. The time now is 12:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy