annotate bin/slashlearn @ 6447:5ad3f5c0dca0

<olsner> rm wisdom/"thing
author HackBot
date Tue, 22 Dec 2015 15:31:37 +0000
parents 9c603f748542
children 73ffca368bac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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»"