plan9fox/acme/bin/new

11 lines
203 B
Text
Raw Normal View History

2011-04-14 17:27:24 +00:00
#!/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