Skip to content
Snippets Groups Projects
Commit 15e273f9 authored by Thorsten Wißmann's avatar Thorsten Wißmann :guitar:
Browse files

Improve and fixup cool2tatl.sh

parent 1ec1a764
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
agentcnt="${1:-4}"
aglist="$(seq 1 $agentcnt|tr '\n' ,)"
aglist=${aglist%%,}
cat \
| sed 's:True:(p \\/ ~p):g' \
| sed 's:False:(p /\\ ~p):g' \
| sed 's:\&:/\\:g' \
| sed 's:=>:->:g' \
| sed 's:|:\\/:g' \
| sed 's:<{[ ]*:<<:g' \
| sed 's:[ ]*}>:>>:g' \
| sed 's:\[{[ ]*:~<<:g' \
| sed 's:[ ]*}\]:>>~:g' \
| sed 's:\[{[ ]*:<<:g' \
| sed 's:[ ]*}\]:>>X :g' \
| sed 's:<{[ ]*:~<<:g' \
| sed 's:[ ]*}>:>>X ~:g' \
| sed -e :a -e 's:<<\([^ >]*\) [ ]*:<<\1,:g;ta' \
| cat
| sed 's,^,(,' \
| sed 's:$:) /\\ <<'"$aglist"'>>X(p \\/ ~p):'
# Top -> tatlFm $ Dis p (Neg p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment