0046-dc.c - sbase - suckless unix tools
HTML git clone git://git.suckless.org/sbase
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
0046-dc.c (285B)
---
1 #!/bin/sh
2
3 set -e
4
5 tmp1=$$.tmp1
6 tmp2=$$.tmp2
7
8 trap 'rm -f $tmp1 $tmp2' EXIT
9 trap 'exit $?' HUP INT TERM
10
11 cat <<EOF >$tmp1
12 ../dc: stack empty
13 5
14 148.41315910257660342111
15 EOF
16
17 echo 5p >$tmp2
18
19 ../dc $tmp2 <<EOF 2>&1 | diff -u - $tmp1
20 `echo 'e(5)' | ../bc -c ../bc.library`
21 la sa sa sa
22 EOF