cannot start with @samp{-}.
Normally, @command{printf} is safer and easier to use than @command{echo}
-and @command{echo -n}. Thus, you should use @command{printf "%s\n"}
+and @command{echo -n}. Thus, you should use @command{printf '%s\n'}
instead of @command{echo}, and similarly use @command{printf %s} instead
of @command{echo -n}.
instance with Digital Unix v5.0:
@example
-> printf "foo\n|foo\n" | $EGREP '^(|foo|bar)$'
+> printf 'foo\n|foo\n' | $EGREP '^(|foo|bar)$'
|foo
-> printf "bar\nbar|\n" | $EGREP '^(foo|bar|)$'
+> printf 'bar\nbar|\n' | $EGREP '^(foo|bar|)$'
bar|
-> printf "foo\nfoo|\n|bar\nbar\n" | $EGREP '^(foo||bar)$'
+> printf 'foo\nfoo|\n|bar\nbar\n' | $EGREP '^(foo||bar)$'
foo
|bar
@end example
_AC_CHECK_HEADER_COMPILE_FN()ac_fn_$1_check_header_compile "$LINENO" ]dnl
[$ac_header ac_cv_header_$ac_cache "$ac_includes_default"
if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
- printf "%s\n" "[#]define $ac_item 1" >> confdefs.h
+ printf '%s\n' "[#]define $ac_item 1" >> confdefs.h
fi
ac_header= ac_cache=
elif test $ac_header; then
dnl Extra quoting in case 's' or 'n' are user-defined macros when this
dnl is expanded; they almost certainly aren't meant to be used here.
dnl See bug 110377.
-[printf "[%s\n]" $1])
+[printf '[%s\n]' $1])
# AS_ECHO_N(WORD)
m4_define([AS_VAR_GET],
[AS_LITERAL_WORD_IF([$1],
[$$1],
- [`eval 'as_val=${'_AS_ESCAPE([[$1]], [`], [\])'};AS_ECHO(["$as_val"])'`])])
+ [`eval 'as_val=${'_AS_ESCAPE([[$1]], [`], [\])'};printf "[%s\\n]" "$as_val"'`])])
# AS_VAR_IF(VARIABLE, VALUE, IF-TRUE, IF-FALSE)