23 lines
311 B
Bash
23 lines
311 B
Bash
#Utils
|
|
|
|
getbody()
|
|
{
|
|
echo "Write your comment, press ctrl+d on a blank line to submit"
|
|
a=$(cat)
|
|
while read n; do
|
|
b="$b\n$n"
|
|
done <<< "$a"
|
|
c=${b//\"/\\\"}
|
|
body="${c:2}"
|
|
}
|
|
|
|
namedget()
|
|
{
|
|
echo $2:
|
|
if [ $3 ]; then
|
|
echo "(Press ctrl+d on a blank line to submit)"
|
|
read $1 <<< $(cat)
|
|
else
|
|
read $1
|
|
fi
|
|
} |