From: Eric Blake <eblake@redhat.com>
To: cygwin@cygwin.com
Subject: Re: Error using builtin print command in mksh
Date: Wed, 27 Apr 2016 17:23:00 -0000 [thread overview]
Message-ID: <5720C1EE.8070608@redhat.com> (raw)
In-Reply-To: <1461761334.5720b5362ea0f@imp.free.fr>
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]
On 04/27/2016 06:48 AM, leonhard.baumstark@free.fr wrote:
> Hello,
> we are using lots of ksh scripts in mksh. They contain print commands to insert
> separators like ---------------- into text output files. Contrary to Ubuntu's
> ksh this results in the following error message:
>
> $ mksh -c "print ---"
> mksh: print: --: unknown option
'print' is not standardized, so you can't expect it to behave portably.
Fix your script to use
printf -- -------
instead, and then you won't have any portability problems, whether on
cygwin or any other platform.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2016-04-27 13:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 13:43 leonhard.baumstark
2016-04-27 17:23 ` Eric Blake [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5720C1EE.8070608@redhat.com \
--to=eblake@redhat.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).