Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (17 sloc) 151 Bytes
awk '
/^\.cmd *$/{
cmd=""
inshell="yes"
next
}
/^\.endcmd *$/{
system(cmd)
inshell=""
next
}
{ if(inshell)
cmd=cmd $0 "\n"
else
print
}
'