[colug-432] Pausing

Scott Merrill skippy at skippy.net
Fri May 15 21:32:25 EDT 2015


On May 15, 2015 9:28 PM, Steve VanSlyck <s.vanslyck at postpro.net> wrote:
>
> > What makes you think /dev/null is not writable?
>  
> Because I get this:
> steve at vslaw.pro in /home/steve> sudo ping localhost -c 2 -i 3 > /dev/null
> [sudo] password for steve:
>  
> So . . . I need to chagne read to echo. Wilco.
>  

You use the "sudo" command, which prompts for your password.

Try the same ping command without the sudo. It should work.


> On Fri, May 15, 2015, at 21:04, Rick Hornsby wrote:
>>
>>  
>>  
>> 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> 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
>>>>>>> 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
>>>>>
>>>>>  
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> colug-432 mailing list
>>>>>
>>>>> 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
>>>
>>>  
>>>
>>> _______________________________________________
>>>
>>> colug-432 mailing list
>>>
>>> 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
>
>  



More information about the colug-432 mailing list