On 20/12/12 10:06, Florian Pritz wrote:
Signed-off-by: Florian Pritz <bluewind@xinu.at> ---
<snip>
@@ -62,7 +78,15 @@ fi # see http://mywiki.wooledge.org/BashFAQ/020 while IFS= read -u 3 -r -d '' pacfile; do file="${pacfile%.pac*}" - echo "File: $file" + file_type="pac${pacfile##*.pac}" + + case $file_type in + pacnew) printf "$GREEN%s$ALL_OFF" "$file_type";; + pacorig) printf "$YELLOW%s$ALL_OFF" "$file_type";; + pacsave) printf "$BLUE%s$ALL_OFF" "$file_type";; + esac + + printf " found for $PURPLE%s$ALL_OFF\n" "$file"
would this be better: printf " file found for $PURPLE%s$ALL_OFF\n" "$file" pacnew found for /etc/passwd vs pacnew file found for /etc/passwd
if [ ! -f "$file" ]; then echo " $file does not exist" rm -i "$pacfile"