Move under www to ease rsync

This commit is contained in:
2025-10-29 10:51:15 +01:00
parent 2bb22c7583
commit 30ad62e938
890 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
#!/usr/bin/env bash
#-------------------------------------------------------------------------------
# Example 6 for Bash Tips show 21: a poor way to make a configuration file
#-------------------------------------------------------------------------------
#
# Example configuration file using 'export'
#
CFG1='bash21_ex6_1.cfg'
if [[ ! -e $CFG1 ]]; then
echo "Unable to find $CFG1"
exit 1
fi
#
# Alternative configuration file using 'declare', converted from the other one
#
CFG2='bash21_ex6_2.cfg'
#
# Strip out all of the 'export' commands with 'sed' in a process substitution,
# turning the lines into simple variable declarations. Use 'source' to obey
# all of the resulting commands
#
source <(sed 's/^export //' $CFG1)
#
# Scan the (simple) variables beginning with '_CFG_' and convert them into
# a portable form by saving the output of 'declare -p'
#
declare -p "${!_CFG_@}" > $CFG2
#
# Now next time we can 'source' this file instead when we want the variables
#
cat $CFG2
exit