What's going on here?
#! /bin/sh NAME="George W. Bush" printf "Hello, %s\n" $NAME
Command line session:
$ ./printf.sh Hello, George Hello, W. Hello, Bush
printf "Hello, %s\n" "$NAME" works. For why I'm not using
#! /bin/sh FILE="C:\tmp" echo "Filename: $FILE"
$ ./echo.sh Filename: C: mp
The POSIX spec for
echo says, "New applications are encouraged to use
printf instead of
echo" (for this and other reasons).