Hi. I was testing sh() to run shell commands, and I found what I think is a bug.
In KWGT, just place a Text with this formula (based on the if() function example):
$if(df(f)>5, sh("echo 'Weekend: "+df(h:mm:ss)+"'>>'/sdcard/myfile.txt'"), "Workday :(")$
And you'll see that the sh() function is executed even when the condition is not met.
I get a /sdcard/myfile.txt with several "Weekend" + time at least each time the widget is displayed or when the phone display is on.
Thank you.