diff bin/example/indirect.sh @ 693:c7309e7625ba

add indrect referencing example
author Jeff Hammel <k0scist@gmail.com>
date Wed, 02 Jul 2014 10:50:04 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/example/indirect.sh	Wed Jul 02 10:50:04 2014 -0700
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+NAME=foo
+PASSWORD=bar
+IP_ID=91
+ENV=prod
+
+for i in NAME PASSWORD IP_ID ENV
+do
+    echo "export $i=\"$(eval echo \$$i)\""
+done