Back to task

446 symbols bash
Sat Aug 13 05:49:30 2016 hidefromkgb
g()(rev<<<$1|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;tr -d \ <<<${l[@]}+${p[@]}+${k[@]}+:$4|rev)
read -d $'\4' s i d o<<<`tr -d \ |cut -d: -f2-`;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