Move under www to ease rsync
This commit is contained in:
28
www/eps/hpr2483/hpr2483_range_demo.sh
Executable file
28
www/eps/hpr2483/hpr2483_range_demo.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash -
|
||||
|
||||
#
|
||||
# Test script to run the range_parse function
|
||||
#
|
||||
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
||||
#
|
||||
# Source the function. In a real script you'd want to provide a path and check
|
||||
# the file is actually there.
|
||||
#
|
||||
source range_parse.sh
|
||||
|
||||
#
|
||||
# Call range_parse with the first two arguments provided to this script. Save
|
||||
# the output in the variable 'parsed'. The function is called in an 'if'
|
||||
# statement such that it takes different action depending on whether the
|
||||
# parsing was successful or not.
|
||||
#
|
||||
if range_parse "$1" "$2" parsed; then
|
||||
echo "Success"
|
||||
echo "Parsed list: ${parsed}"
|
||||
else
|
||||
echo "Failure"
|
||||
fi
|
||||
|
||||
exit
|
||||
Reference in New Issue
Block a user