arthur.bebou

Le site arthur.bebou.netlib.re - retour accueil

git clone git://bebou.netlib.re/arthur.bebou
Log | Files | Refs |

printlayout (281B)


      1 #! /bin/sh
      2 
      3 the=$(mktemp -d);trap "rm -rf $the" EXIT
      4 
      5 layoutfile="$1";shift
      6 cat | while read line
      7 do
      8 	echo $@ | tr ' ' '\n' > "$the/vars"
      9 	echo "$line" | tr '	' '\n' > "$the/stdin"
     10 	eval $(paste -d'\n' "$the/vars" "$the/stdin" | xargs -d'\n' printf '%s="%s";')
     11 	. $layoutfile
     12 done