rem system$ runs a command and gives back what it printed;
rem system gives back its exit code
kernel$ = system$("uname -s")
print "kernel: ", left$(kernel$, len(kernel$) - 1)

code = system("grep -q ERROR nas.log")
if code = 0 then
  print "the log has errors"
else
  print "no errors in the log"
endif

dim line$(1)
n = token(system$("ls photos"), line$(), chr$(10))
print n, " files in photos, the first is ", line$(1)
