Merged quote-tr-arguments

This commit is contained in:
Brian Fraser
2012-08-24 20:02:48 -03:00
6 changed files with 18 additions and 18 deletions

View File

@@ -29,7 +29,7 @@ PTDEBUG="${PTDEBUG:-""}"
EXIT_STATUS=0
log() {
TS=$(date +%F-%T | tr :- _);
TS=$(date +%F-%T | tr ':-' '_');
echo "$TS $*"
}

View File

@@ -274,7 +274,7 @@ _eval_po() {
while read key val; do
case "$key" in
long)
opt=$(echo $val | sed 's/-/_/g' | tr [:lower:] [:upper:])
opt=$(echo $val | sed 's/-/_/g' | tr '[:lower:]' '[:upper:]')
;;
default)
default_val="$val"
@@ -485,7 +485,7 @@ _parse_command_line() {
if [ "$opt_is_ok" ]; then
# Get and transform the opt's long form. E.g.: -q == --quiet == QUIET.
opt=$(cat "$spec" | grep '^long:' | cut -d':' -f2 | sed 's/-/_/g' | tr [:lower:] [:upper:])
opt=$(cat "$spec" | grep '^long:' | cut -d':' -f2 | sed 's/-/_/g' | tr '[:lower:]' '[:upper:]')
# Convert sizes.
if grep "^type:size" "$spec" >/dev/null; then