help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

\n displayed instead of newline


From: lisa-asket
Subject: \n displayed instead of newline
Date: Wed, 30 Jun 2021 15:07:19 +0200 (CEST)

>From: Greg Wooledge <greg@wooledge.org>
>To: help-bash@gnu.org
>Subject: Re: \n displayed instead of newline
>Date: 30/06/2021 13:29:10 Europe/Paris

>On Wed, Jun 30, 2021 at 07:58:34AM +0200, lisa-asket@perso.be wrote:
>> This is what I have
>> 
>>     ua="grep -ir --exclude=\\*.el --include=\\*.{org,texi}  \\"
>>     ub="  -C 8 \"hilbert\" /marshall/"
>>     printf "Usage: %s\n %s\n" $ua $ub

>This is a mess, starting with the fact that you didn't quote "$ua"
>and "$ub".



It is a mess



>I don't see what advantage you think you're gaining by splitting the
>message into pieces like that. If I were you, I'd throw this whole
>thing away and use a here-document:



Small screen size



>cat <<'EOF'
>Usage: grep -ir --exclude=\*.el --include=\*.{orig,texi} \
>-C 8 "hilbert" /marshall/
>EOF

>Just place the entire message directly into the script, exactly as you
>want it to be printed. (There's a tab-indented variant, if you want to

>go down that road, but start with the simpler version first.)



Does 'EOF' do a different thing than "EOF".














reply via email to

[Prev in Thread] Current Thread [Next in Thread]