9812 |
@end example |
@end example |
9813 |
|
|
9814 |
|
|
9815 |
|
@item @command{printf} |
9816 |
|
@c ------------------ |
9817 |
|
@prindex @command{printf} |
9818 |
|
A format string starting with a @samp{-} can cause problems. |
9819 |
|
@command{bash} (eg. 2.05b) will interpret it as an options string and |
9820 |
|
give an error. And @samp{--} to mark the end of options is not good |
9821 |
|
in the NetBSD Almquist shell (eg. 0.4.6) which will take that |
9822 |
|
literally as the format string. Putting the @samp{-} in a @samp{%c} |
9823 |
|
or @samp{%s} is probably the easiest way to avoid doubt, |
9824 |
|
|
9825 |
|
@example |
9826 |
|
printf %s -foo |
9827 |
|
@end example |
9828 |
|
|
9829 |
|
|
9830 |
@item @command{pwd} |
@item @command{pwd} |
9831 |
@c ---------------- |
@c ---------------- |
9832 |
@prindex @command{pwd} |
@prindex @command{pwd} |