Sponsored Content
Top Forums UNIX for Dummies Questions & Answers cp output /dev/null results in not a directory Post 302318893 by jim mcnamara on Friday 22nd of May 2009 03:20:31 PM
Old 05-22-2009
In standard shell:
Code:
#!/bin/ksh
time for FILE in *
do
   cp $FILE /dev/null
done 2>/dev/null

works just fine 2> /dev/null hides errors about directories
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Q1 :/dev/null Q2 -A

Hi, Q1-What does nroff -ms > /dev/null Q2- What does mean -A under STAT column : ps aux |head -20 UTIL PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND root 516 93,0 0,0 12 12 - A 04 nov 3906:51 wait Thank you. (4 Replies)
Discussion started by: big123456
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. Shell Programming and Scripting

> /dev/null

hello all, In many shell scripts i found '> /dev/null' , i am not able to get this, will any one please explain why we are using this. thanks sudha (2 Replies)
Discussion started by: rrs
2 Replies

4. 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

5. 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

6. Shell Programming and Scripting

Error output of cat to /dev/null

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

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. 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

9. 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

10. Shell Programming and Scripting

Help with /dev/null Please

Hello All and a Happy New year to yous guys. I'm running the below command on my AIX box and it keeps giving me the message that the file doesn't exist. I know the file don't exist, but I don't want to see the error. 2>/dev/null doesn't work. bash-3.00$ ls -l C* | wc -l 2>/dev/null ls:... (2 Replies)
Discussion started by: bbbngowc
2 Replies
SMFPLAY(1)						    BSD General Commands Manual 						SMFPLAY(1)

NAME
smfplay -- play a standard MIDI file SYNOPSIS
smfplay [-mxy] [-g measure] [-d devname] [-i devname] midifile DESCRIPTION
The smfplay utility plays a MIDI file. While playing, it can route events from one midi(4) device to another. To stop performance, send an interrupt signal to smfplay (for instance by pressing control ^C on the terminal). The options are as follows: -m Use metronome. The metronome will follow tempo changes and time signature changes in the midi file. -x Synchronise to an external midi(4) device. If the -i flag is used then playback will be synchronised to the input device else it will be synchronised to the default device. -y Send midi timing information to the default device. Useful if the output device is a slave MIDI sequencer. -g measure Start playback at the given measure number. -d filename Default midi(4) device on which to play the midi file. If not specified, the content of the MIDIDEV environment variable will be used instead. -i filename Alternate input midi(4) device. Voice events (notes, controllers, etc) received on the input device will be sent as-is to the default device. Without this flag, the default device will be used for input. The smfplay utility is an interface to midish(1). If more specific features are needed, the user may consider using midish(1). EXAMPLES
The following will play mysong.mid on device /dev/rmidi4 and will use metronome. $ smfplay -m -d /dev/rmidi4 mysong.mid SEE ALSO
smfrec(1), midish(1), midiplay(1), midi(4) BSD
August 22, 2005 BSD
All times are GMT -4. The time now is 10:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy