Leonardo wrote: > basename does not check if the file exists. That's expected behaviour. Use the test command to check file existence:
input=Desktop/okidoki file=$(test -e "$input" && basename "$input") [ "$file" ] && echo "$file" || echo "missing" Pádraig. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
