Move under www to ease rsync
This commit is contained in:
22
www/eps/hpr3013/hpr3013_bash21_ex4.sh
Executable file
22
www/eps/hpr3013/hpr3013_bash21_ex4.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Example 4 for Bash Tips show 21: a way of showing environment variables
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# We expect one or more arguments
|
||||
#
|
||||
if [[ $# = 0 ]]; then
|
||||
echo "Usage: $0 variable_name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Loop through the arguments reporting their attributes with 'declare'
|
||||
#
|
||||
for arg; do
|
||||
declare -p "$arg"
|
||||
done
|
||||
|
||||
exit
|
||||
Reference in New Issue
Block a user