What Operating System and version?
What Shell?
How many files?
Was the script created on the unix server with a proper unix editor such as "vi" ? If not, what was used.
I'm writing/testing the script on
- Linux pclinux 2.6.15-27-386 #1 PREEMPT Sat Sep 16 01:51:59 UTC 2006 i686 GNU/Linux (ubuntu dapper drake)
- /bin/bash
But eventually it needs to run on
- Linux embLinux 2.6.12 #184 Wed Dec 9 08:35:30 CET 2009 armv4tl unknown
- /bin/sh
The results are the same on both systems
- anything between 0 and 100 files
- the files are created using gedit
Just for interest the $ sign (only) at the end of the line when viewed with "sed" tells me that this is a normal unix text file.
The problem with the script is the backticks. Not required in this context and will cause the error you are seeing. It will try to execute each file in the directory list and fail on the first one because it is not in $PATH !
Removving the backticks is no solution, the result is the same (I had already played with this).
It is not first file on which it gives an error, it gives an error that the final file does not exist. It looks as though the system has difficulties with writing "nothing" to a file that does not exist.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)