[colug-432] Pausing
Rick Hornsby
richardjhornsby at gmail.com
Fri May 15 21:04:31 EDT 2015
Steve VanSlyck wrote:
> Hi Rick.
> Here are the lines from the script:
> # Install the dialog utility
> read -p "Invisible Island's dialog utility will be installed. See
> http://invisible-island.net/dialog ."
> sleep 2s # or ping localhost -c 2 -i 2 > null
> yum -y install dialog
Right, so the reason it is pausing is because of your read command.
That line is waiting for an EOF, which comes when you finally hit enter.
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_08_02.html
> (I cannot send to /dev/null because that requires sudo and that's a
> pain for testing.)
Uh ...? That doesn't sound right -or- like a badly configured host for
this reason:
http://man7.org/linux/man-pages/man4/null.4.html
NOTES:
If these devices are not writable and readable for all
users, many
programs will act strangely.
What makes you think /dev/null is not writable?
> For each one, execution stops until I press <enter>
> On Fri, May 15, 2015, at 20:44, Rick Hornsby wrote:
>> Steve VanSlyck wrote:
>>> I'd tried sleep 3s after trying sleep 3, which didn't work.
>> Need more context. Sleep is the correct command for pausing.
>> ./sleep_test.sh
>> Fri May 15 19:41:57 CDT 2015
>> Fri May 15 19:42:00 CDT 2015
>> aztec:bin rhornsby$ cat sleep_test.sh
>> #!/bin/bash
>> date
>> sleep 3
>> date
>>> Unfortunately your corrected ping local host doesn't work eether.
>>> Want's me to press <enter>.
>>> On Fri, May 15, 2015, at 20:32, Mike Plemmons wrote:
>>>>
>>>> Try
>>>> sleep 3
>>>> ping localhost -c 2 -I 3 > /dev/null
>>>>
>>>> On May 15, 2015 8:24 PM, "Steve VanSlyck" <s.vanslyck at postpro.net
>>>> <mailto:s.vanslyck at postpro.net>> wrote:
>>>>
>>>> I tried both of these in my script and neether one would continue.
>>>> Both worked fine at the command line.
>>>> Hints?
>>>> sleep 3s
>>>> ping localhost -c 2 -i 3 > nul
>>>> _______________________________________________
>>>> colug-432 mailing list
>>>> colug-432 at colug.net <mailto:colug-432 at colug.net>
>>>> http://lists.colug.net/mailman/listinfo/colug-432
>>>>
>>>> _________________________________________________
>>>> colug-432 mailing list
>>>> colug-432 at colug.net <mailto:colug-432 at colug.net>
>>>> http://lists.colug.net/mailman/listinfo/colug-432
>>> _______________________________________________
>>> colug-432 mailing list
>>> colug-432 at colug.net <mailto:colug-432 at colug.net> http://lists.colug.net/mailman/listinfo/colug-432
>> _________________________________________________
>> colug-432 mailing list
>> colug-432 at colug.net <mailto:colug-432 at colug.net>
>> http://lists.colug.net/mailman/listinfo/colug-432
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20150515/c7037ab4/attachment.html
More information about the colug-432
mailing list