Bit of lateral thinking here.
How about using the sound card as your delay; ensure it is enabled at maximum volume.
Some demo code to show as an example, OSX 10.7.5 default bash terminal, just
comment out the "afplay" lines and uncomment the "aplay" lines for Ubuntu:-
Results...
You have the added advantage of having a 1 second pure sinewave burst too!
This User Gave Thanks to wisecracker For This Post:
Well it __might__ be useful to systems that do not have the "sleep" command.
Android for example.
As it is a wave file the principle could be used to create a function generator
system on just about any platform and use the default player on said platform
as the signal source.
Already working on my BlackBerry 'phone ready for calibrating the AudioScope...
This snippet was just a side effect that could be useful...
Thanks, wisecracker, for those keen insights. It'll take me a bit to unravel & apply, but I know I learned something useful here
Quote:
Bit of lateral thinking here
Found the solution to the "read -t" issue in my bumblings about.
This works :
Indeed, Ubuntu loves a certain incarnation of dash; which, for some reason, is averse to "read." Nasty habit, that /bin/sh bangline...
(FWIW, I was given to understand bash would automagically "step in" when situations such as this came up (as is done in Parted Magic), hence the default /sh bang usage...)
At any rate, and if folks could humor me a moment longer, how might we go about forming a commandline to point read at empty space (via -u, perhaps?) as opposed to taking user input? Possible???
Thanks again --
Last edited by LinQ; 03-13-2014 at 12:29 PM..
Reason: Grammar...
Hi,
I have a script that runs a process at the beginning and I want to sleep/wait until this process is finished and then continue with the rest of the script. I am trying with this, but it is not working:
process=`ps -ef | grep "proc_p01 -c" | grep -v grep | wc -l`
if ; do
sleep 10
done... (7 Replies)
while sleep 1; do
pgrep Polo || {
kill `pidof Polo` >/dev/null
/var/bin/polo_start.sh start &
echo `date` R >> /var/log/Check_Polo .log
}
done
exit 0well , i use that script as a watchdog in my box (with has just 32 mb memory) which check every second if... (8 Replies)
Is there any other editor, installed by 'default' in Sparc Solaris10, besides vi?
I'd like to avoid installing anything new.
If not, how to make vi more user-friendly?
thanks. (8 Replies)
Hi techies ..
This is my first posting hr ..
Am facing a serious performance problem in counting the number of lines in the file. The input files i get will be in some 10 to 15 Gb of size or even sometimes more ..and I will load it to db
I have used wc -l to confirm whether the loader... (14 Replies)
This is a very crude attempt in Bash at something that I needed but didn't seem to find in the 'sleep' command. However, I would like to be able to do it without the need for the temp file. Please go easy on me if this is already possible in some other way:
How many times have you used the... (5 Replies)
unistd.h declares the prototype of the sleep function. where is the sleep function actually defined? where is the control transfered when we include a sleep call in it?? (2 Replies)
Does anyone know a way to sleep less than 1 second?
Sometimes when I write scripts that iterates a loop many times it would be
nice to slow things down, but sometimes 1 second is too much. (9 Replies)
If I want a script to sleep for less than a second, would I use a decimal? In other words, if I wanted my script to sleep for 1/4 of a second, would I say, SLEEP .25 ?? (5 Replies)