LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is this the write way to write a 2 command loop script? (https://www.linuxquestions.org/questions/linux-newbie-8/is-this-the-write-way-to-write-a-2-command-loop-script-4175501697/)

Bobbyyyy 04-14-2014 01:58 PM

Is this the write way to write a 2 command loop script?
 
Okay, I just wanted to know if this would run 2 commands and loop. If not could you help me out with rearranging or adding things in.

#!/bin/bash
while :
do
command1
sleep 1
command2
sleep 1
done

So would this work?

suicidaleggroll 04-14-2014 02:03 PM

Keep it to one thread:
http://www.linuxquestions.org/questi...lp-4175501602/


All times are GMT -5. The time now is 08:03 PM.