comparison bin/example/interpolate.sh @ 852:565875bc93b7

[bash example] interpolatation skeleton
author Jeff Hammel <k0scist@gmail.com>
date Sun, 10 Dec 2017 11:38:00 -0800
parents
children
comparison
equal deleted inserted replaced
851:a5eae2810f23 852:565875bc93b7
1 #!/bin/bash
2
3 if [ "$#" == "0" ]
4 then
5 echo "Usage: $0 file [file] [...]"
6 exit 1
7 fi
8
9 for arg in "$@"
10 do
11 eval "cat <<EOF
12 $(<$arg)
13 EOF
14 " 2> /dev/null
15 done