This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error using builtin print command in mksh


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: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]