shithub: riscv

ref: ad7120b2e2f0ed0d226eec1b5ef6fc6b3eebb4ef
dir: /acme/bin/new/

View raw version
#!/bin/rc

id=`{cat /mnt/acme/new/ctl}
id=$id(1)
cmd = $*
if(~ $#cmd 0) cmd = cat

echo 'name '^`{pwd}^/-^`{basename $cmd(1)} > /mnt/acme/$id/ctl
$cmd > /mnt/acme/$id/body
echo clean > /mnt/acme/$id/ctl