[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: optim, struct, parallel: pre-release check on Windows?
From: |
Olaf Till |
Subject: |
Re: optim, struct, parallel: pre-release check on Windows? |
Date: |
Sat, 16 Apr 2016 11:35:20 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Apr 15, 2016 at 09:04:12AM -0700, Mike Miller wrote:
> On Fri, Apr 15, 2016 at 17:42:31 +0200, Olaf Till wrote:
> > It was a mistake of mine, and now I see that echo needs this switch
> > even at my system. As soon as I have time I'll have to figure out why
> > the Makefile worked for me at all.
>
> Because this is one of those non-portable shell things that vary wildly
> depending on your environment :)
>
> Try these:
>
> dash -c 'echo "line 1\nline 2\n"'
> bash -c 'echo "line 1\nline 2\n"'
> bash -c 'shopt -s xpg_echo; echo "line 1\nline 2\n"'
> /bin/echo "line 1\nline 2\n"
>
> The -e option to echo is not portable:
>
> dash -c 'echo -e "line 1\nline 2\n"'
>
> The safest practice is to assume that echo produces undefined output
> when it encounters a backslash. If you want multiple lines of output,
> just do multiple echo commands. If you want other escape sequences like
> a tab, use the printf command instead.
Very instructive, thank you. This spares me a lot of time and maybe
further mistakes.
Olaf
--
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net
signature.asc
Description: Digital signature
- Re: optim, struct, parallel: pre-release check on Windows?, Marco Atzeri, 2016/04/13
- Re: optim, struct, parallel: pre-release check on Windows?, Olaf Till, 2016/04/13
- Re: optim, struct, parallel: pre-release check on Windows?, Marco Atzeri, 2016/04/15
- Re: optim, struct, parallel: pre-release check on Windows?, Olaf Till, 2016/04/15
- Re: optim, struct, parallel: pre-release check on Windows?, Mike Miller, 2016/04/15
- Re: optim, struct, parallel: pre-release check on Windows?,
Olaf Till <=