annotate bin/msg @ 10475:3edae8285d40

<oerjan> fetch bin/msg https://hackego.esolangs.org/get/bin/slashlearn
author HackBot
date Tue, 21 Mar 2017 15:07:17 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10475
3edae8285d40 <oerjan> fetch bin/msg https://hackego.esolangs.org/get/bin/slashlearn
HackBot
parents:
diff changeset
1 sep='//`'
3edae8285d40 <oerjan> fetch bin/msg https://hackego.esolangs.org/get/bin/slashlearn
HackBot
parents:
diff changeset
2 [[ "$1" == ?*"$sep"* ]] || { echo 'Usage: `msg <comment>'"$sep"'<command>' >&2 ; exit 1; }
3edae8285d40 <oerjan> fetch bin/msg https://hackego.esolangs.org/get/bin/slashlearn
HackBot
parents:
diff changeset
3 command="${1#*$sep}"
3edae8285d40 <oerjan> fetch bin/msg https://hackego.esolangs.org/get/bin/slashlearn
HackBot
parents:
diff changeset
4 "${command%% *}" "${command#* }"