cfunction
src/core/os.c on line 1552 , column 1
(os/shell str )
Pass a command string str directly to the system shell.
(os/shell "seq 12 | head -n 1" ) # => 1
(os/shell "uptime > /tmp/uptime.txt" ) # => 0
(slurp "/tmp/uptime.txt" )
# => @"22:33 up 5 days, 9:34, 15 users, load averages: 1.93 1.74 1.59\n"
(os/rm "/tmp/uptime.txt" ) # => nil
(os/shell "uptime" ) # => 0
# printed to the console:
22 :30 up 5 days , 9 :31 , 15 users , load averages: 1.48 1.50 1.49