2
0

shell.sh 196 B

123456789101112131415
  1. getvar() {
  2. eval "echo \"\${$1}\""
  3. }
  4. var2file() {
  5. local var
  6. eval "var=\"\${$1}\""
  7. if [ -n "$var" ]; then echo "$var" > "$2"; fi
  8. }
  9. isset() {
  10. local var
  11. eval "var=\"\${$1}\""
  12. [ -n "$var" ]
  13. }