| skipped 244 lines |
245 | 245 | | lse_exclude_paths() { |
246 | 246 | | local IFS=" |
247 | 247 | | " |
248 | | - | for p in `echo $1 | tr ',' '\n'`; do |
249 | | - | [ "`printf $p | cut -c1`" = "/" ] || lse_error "'$p' is not an absolute path." |
| 248 | + | for p in `printf "$1" | tr ',' '\n'`; do |
| 249 | + | [ "`printf \"$p\" | cut -c1`" = "/" ] || lse_error "'$p' is not an absolute path." |
250 | 250 | | p="${p%%/}" |
251 | 251 | | lse_find_opts="$lse_find_opts -path ${p} -prune -o" |
252 | 252 | | done |
| skipped 41 lines |
294 | 294 | | local question="$1" |
295 | 295 | | # We use stderr to print the question |
296 | 296 | | cecho "${white}${question}: ${reset}" >&2 |
297 | | - | read answer |
298 | | - | case answer in |
| 297 | + | read -r answer |
| 298 | + | case "$answer" in |
299 | 299 | | y|Y|yes|Yes|ok|Ok|true|True) |
300 | 300 | | return 0 |
301 | 301 | | ;; |
| skipped 43 lines |
345 | 345 | | if [ "$lse_selection" ]; then |
346 | 346 | | local sel_match=false |
347 | 347 | | for s in $lse_selection; do |
348 | | - | if [ "$s" = "$id" ] || [ "$s" = "`printf '$id' | cut -c1-3`" ]; then |
| 348 | + | if [ "$s" = "$id" ] || [ "$s" = "`printf \"$id\" | cut -c1-3`" ]; then |
349 | 349 | | sel_match=true |
350 | 350 | | fi |
351 | 351 | | done |
| skipped 92 lines |
444 | 444 | | if [ "$lse_selection" ]; then |
445 | 445 | | local sel_match=false |
446 | 446 | | for s in $lse_selection; do |
447 | | - | if [ "`printf $s|cut -c1-3`" = "$id" ]; then |
| 447 | + | if [ "`printf \"$s\"|cut -c1-3`" = "$id" ]; then |
448 | 448 | | sel_match=true |
449 | 449 | | break |
450 | 450 | | fi |
| skipped 13 lines |
464 | 464 | | [ "$1" ] && ec=$1 |
465 | 465 | | text="$text(${green} FINISHED ${magenta})==================================" |
466 | 466 | | cecho "$text${reset}\n" |
467 | | - | exit $ec |
| 467 | + | exit "$ec" |
468 | 468 | | } |
469 | 469 | | #) |
470 | 470 | | |
| skipped 705 lines |
1176 | 1176 | | e) lse_exclude_paths "${OPTARG}";; |
1177 | 1177 | | i) lse_interactive=false;; |
1178 | 1178 | | l) lse_set_level "${OPTARG}";; |
1179 | | - | s) lse_selection="`printf ${OPTARG}|sed 's/,/ /g'`";; |
| 1179 | + | s) lse_selection="`printf \"${OPTARG}\"|sed 's/,/ /g'`";; |
1180 | 1180 | | h) lse_help; exit 0;; |
1181 | 1181 | | *) lse_help; exit 1;; |
1182 | 1182 | | esac |
| skipped 24 lines |