<div class="gmail_quote">Sorry, spasmed and hit the Send button too early.  Here&#39;s what I was going to say my script would be like:</div><div class="gmail_quote"><br></div><div class="gmail_quote">---------------------------------------------------</div>
<div class="gmail_quote"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div># record from hd-pvr for 1 second.  How do I limit this to 1 second?</div><div>
cat /dev/video0 &gt; /tmp/test.ts</div><div><br></div><div># test for 0 length</div><div>if [! -s /tmp/test.ts]</div><div>then</div><div>    # toggle STB power state</div><div>    6200ch -w</div><div>fi</div><div><br></div>
<div># delay may not be necessary, will test</div><div>sleep 5</div><div><br></div><div># run 6200ch with normal arguments to change channels</div><div>6200ch ...</div><div>------------------------------------------------</div>
<div>I have practically no experience writing scripts, so if anyone wants to tell me a better way to do this, please do.  Also, how do I get cat to only run for a limited amount of time?</div><div><br></div><div>Thanks,</div>
<div>Jerry</div></span></div>