Back to task

445 symbols bash
Sat Aug 13 06:20:00 2016 hidefromkgb
g()(rev<<<$@|fold -w1)
h()(p=${3:-$2};k=(`yes _|head -${#p}`);p=(${k[@]});l=(`g $3`);r=(`g $2`)
for x in ${1//,/ };do n=${x#*:};x=m=${x%:*};k[$x]=$[++j]
while((m>=n));do p[$m]=-;l[$[${#3}?m--:y++]]=${r[$[${#3}?y++:m--]]};done
p[$x]=\/;p[$n]=^;((n<x))&&p[$n]=\\
done;g ${l[@]}+${p[@]}+${k[@]}+:$4|tr -d \\n\ )
read -d $'\4' s i d o<<<`cut -d: -f2-|tr -d \ `;i=`h $i $s`;e=${i##*+}
h $o $e $d oT++$e=++`rev<<<${i%$e}$s`morF|sed s/_*+/\\n/g|tr _ \ 


Leave a comment

Parsed as Markdown

Login to leave a comment