Thorkil Naur <[EMAIL PROTECTED]> writes:
>>> -yes | head -n 4000 | xargs echo -n > foo
>>> +printf "File contents" > foo

While OK above, it's usually better to write

    printf %s foo

rather than

    printf foo

particularly when "foo" is derived from user input.

> Thanks to twb for this. Although I haven't had problems with echo -n,
> he mentioned that it was not portable.

It is explicitly required by Debian policy as an extension to POSIX,
from which I infer that echo -n is not part of POSIX.  Probably "in the
wild" most systems implement echo -n.

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to