<div dir="ltr">On Sat, Dec 9, 2017 at 12:28 AM, Mike Hodson <span dir="ltr"><<a href="mailto:mystica@gmail.com" target="_blank">mystica@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-">On Fri, Dec 8, 2017 at 7:13 PM, Bill Meek <span dir="ltr"><<a href="mailto:keemllib@gmail.com" target="_blank">keemllib@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-m_-4592818423654662712gmail-">On 12/08/2017 12:53 PM, Marius Schrecker wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
$sudo bash -c "echo `date '+%s' -d '+ 6 minutes'` > /sys/class/rtc/rtc0/wakealarm</blockquote></span></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Use: echo `date '+%s' -d '+ 6 minutes'`| sudo tee /sys/class/rtc/rtc0/wakealarm"</blockquote><div><br></div></span><div>Bill, normally sudo of echo redirecting will not work; the user-shell is still used for redirection.</div><div>However, in his case, not only is he running bash -c "full command with redirect", but he also later cats the result in /sys/class/rtc/rtc0/<wbr>wakealarm and comes up with the proper time/date.</div><div><br></div><div>>></div><div><span class="gmail-"><div>>> $date</div><div>>> fr. 08. des. 19:42:53 +0100 2017</div></span><span class="gmail-"><div>>> $sudo bash -c "echo `date '+%s' -d '+ 6 minutes'` > /sys/class/rtc/rtc0/wakealarm"</div></span><span class="gmail-"><div>>> $ cat /sys/class/rtc/rtc0/wakealarm</div><div>>> 1512758974</div><div>>> $ date -d @1512758974</div><div>>> fr. 08. des. 19:49:34 +0100 2017</div></span></div><div>>></div><div><br></div><div>I've even performed an empirical test, and indeed as long as the redirect is within the double-quotes of bash -c "command here > file" it works for me in a different scenario:</div><div><br></div><div><span style="font-family:monospace"><span style="font-weight:bold;color:rgb(84,255,84)">mike@bifrost</span><span style="font-weight:bold;color:rgb(84,84,255)"> /root $</span><span style="color:rgb(0,0,0)"> sudo bash -c "echo `date '+%s' -d '+ 6 minutes'` > derp"  </span><br>Password:  <br><span style="font-weight:bold;color:rgb(84,255,84)">mike@bifrost</span><span style="font-weight:bold;color:rgb(84,84,255)"> /root $</span><span style="color:rgb(0,0,0)"> ls -al derp
</span><br>-rw-r--r-- 1 root root 11 Dec  9 01:21 derp
<br><span style="font-weight:bold;color:rgb(84,255,84)">mike@bifrost</span><span style="font-weight:bold;color:rgb(84,84,255)"> /root $</span><span style="color:rgb(0,0,0)"> cat derp
</span><br>1512800877<br>
<br></span></div><div><div><font face="arial, helvetica, sans-serif">Thus I have to believe that Marius's shell is indeed writing the exposed rtc device properly, unless there are some syntax quoting issues somewhere else.. </font></div></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div>I'm puzzled here, and am curious if A:  it has ever worked at all properly, and if not, B: if the BIOS is buggy?</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>Mike</div></font></span></div></div></div>
<br></blockquote></div></div><div class="gmail_extra"><span style="font-family:monospace"><span style="color:rgb(0,0,0)">echo $(date +%s -d "+6 minutes")</span></span></div></div>