sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

0001-echo.sh (196B)


      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 tmp=tmp1.$$
      6 
      7 cleanup()
      8 {
      9 	st=$?
     10 	rm -f $tmp
     11 	exit $st
     12 }
     13 
     14 trap cleanup EXIT
     15 
     16 ../echo -n --hello-- --world--! > $tmp
     17 
     18 tr -d '\n' <<'EOF' | diff -u - $tmp
     19 --hello-- --world--!
     20 EOF