Mercurial > repo
annotate bin/slashlearn @ 5882:4c331b3a4c04
<mroman> learn fisdom is the domination by the feder inspection station.
author | HackBot |
---|---|
date | Mon, 03 Aug 2015 12:06:51 +0000 |
parents | 9c603f748542 |
children | 73ffca368bac |
rev | line source |
---|---|
5010
e281f5947a6a
<shachaf> ` echo $\'#!/bin/bash\\ntopic=$(echo "$1" | lowercase | cut -d / -f 1)\\n[ -z "$topic" ] && exit 1\\nvalue=$(echo "$1" | cut -d / -f 2-)\\necho "$value" > wisdom/"$topic" && echo "Learned \xc2\xab$topic\xc2\xbb"\' > bin/slashlearn
HackBot
parents:
diff
changeset
|
1 #!/bin/bash |
5867
9c603f748542
<int-e> ` sed -i 1a\'[[ "$1" = */* ]] || exit\' bin/slashlearn
HackBot
parents:
5010
diff
changeset
|
2 [[ "$1" = */* ]] || exit |
5010
e281f5947a6a
<shachaf> ` echo $\'#!/bin/bash\\ntopic=$(echo "$1" | lowercase | cut -d / -f 1)\\n[ -z "$topic" ] && exit 1\\nvalue=$(echo "$1" | cut -d / -f 2-)\\necho "$value" > wisdom/"$topic" && echo "Learned \xc2\xab$topic\xc2\xbb"\' > bin/slashlearn
HackBot
parents:
diff
changeset
|
3 topic=$(echo "$1" | lowercase | cut -d / -f 1) |
e281f5947a6a
<shachaf> ` echo $\'#!/bin/bash\\ntopic=$(echo "$1" | lowercase | cut -d / -f 1)\\n[ -z "$topic" ] && exit 1\\nvalue=$(echo "$1" | cut -d / -f 2-)\\necho "$value" > wisdom/"$topic" && echo "Learned \xc2\xab$topic\xc2\xbb"\' > bin/slashlearn
HackBot
parents:
diff
changeset
|
4 [ -z "$topic" ] && exit 1 |
e281f5947a6a
<shachaf> ` echo $\'#!/bin/bash\\ntopic=$(echo "$1" | lowercase | cut -d / -f 1)\\n[ -z "$topic" ] && exit 1\\nvalue=$(echo "$1" | cut -d / -f 2-)\\necho "$value" > wisdom/"$topic" && echo "Learned \xc2\xab$topic\xc2\xbb"\' > bin/slashlearn
HackBot
parents:
diff
changeset
|
5 value=$(echo "$1" | cut -d / -f 2-) |
e281f5947a6a
<shachaf> ` echo $\'#!/bin/bash\\ntopic=$(echo "$1" | lowercase | cut -d / -f 1)\\n[ -z "$topic" ] && exit 1\\nvalue=$(echo "$1" | cut -d / -f 2-)\\necho "$value" > wisdom/"$topic" && echo "Learned \xc2\xab$topic\xc2\xbb"\' > bin/slashlearn
HackBot
parents:
diff
changeset
|
6 echo "$value" > wisdom/"$topic" && echo "Learned «$topic»" |