annotate bin/? @ 10843:2d5ba2d44680

<Jafet> le/rn double dactyl//Curious spurious verse form, ostensibly catchy to hear but herculean to write. Sadly its bent on the sesquipedalian makes double dactyls pretentious and trite.
author HackBot
date Fri, 28 Apr 2017 02:49:16 +0000
parents c41d527b33a0
children a5c372384510
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9075
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
1 #!/bin/bash
10655
c41d527b33a0 <oerjan> undo 10629
HackBot
parents: 10629
diff changeset
2 topic=$(echo "$1" | lowercase | sed "s/noo\+dl/nooodl/;s/ *$//")
10340
4d09ce3dbd12 <oerjan> sled bin/?//3s,``,`\\\\(`\\\\|$\\\\),
HackBot
parents: 10261
diff changeset
3 topic1=$(echo '`'"$topic" | sed 's/^`\(`\|$\)//')
10259
cc2a8bbb4738 <oerjan> sled bin/?//4,$s/topic1/topic2/;10i elif [ -e "$topic1" ];
HackBot
parents: 10258
diff changeset
4 topic2=$(echo "$topic" | sed "s/s$//")
9075
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
5 cd wisdom
10259
cc2a8bbb4738 <oerjan> sled bin/?//4,$s/topic1/topic2/;10i elif [ -e "$topic1" ];
HackBot
parents: 10258
diff changeset
6 if [ \( "_$topic2"_ = "_ngevd"_ \) -a \( -e ngevd \) ];
9075
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
7 then cat /dev/urandom;
c989a1669243 <fizzie> revert 58b9ee8f97a7
HackBot
parents:
diff changeset
8 elif [ -e "$topic" ];
10091
5aa89f714ea0 <oerjan> sled bin/?//s, [|] rnooodl,,g;s,fi,fi | rnooodl,
HackBot
parents: 9407
diff changeset
9 then cat "$topic";
10260
34c848603b51 <oerjan> sled bin/?//10s/^/ /;11ithen cat "$topic1";
HackBot
parents: 10259
diff changeset
10 elif [ -e "$topic1" ];
10261
5a436877bd42 <oerjan> sled bin/?//11s/^/ /
HackBot
parents: 10260
diff changeset
11 then cat "$topic1";
10259
cc2a8bbb4738 <oerjan> sled bin/?//4,$s/topic1/topic2/;10i elif [ -e "$topic1" ];
HackBot
parents: 10258
diff changeset
12 elif [ -e "$topic2" ];
cc2a8bbb4738 <oerjan> sled bin/?//4,$s/topic1/topic2/;10i elif [ -e "$topic1" ];
HackBot
parents: 10258
diff changeset
13 then cat "$topic2";
10253
6a354a197616 <oerjan> revert
HackBot
parents: 10252
diff changeset
14 else echo "$1? ¯\(°​_o)/¯"; exit 1;
10091
5aa89f714ea0 <oerjan> sled bin/?//s, [|] rnooodl,,g;s,fi,fi | rnooodl,
HackBot
parents: 9407
diff changeset
15 fi | rnooodl