[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \n displayed instead of newline
From: |
Greg Wooledge |
Subject: |
Re: \n displayed instead of newline |
Date: |
Wed, 30 Jun 2021 07:29:10 -0400 |
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".
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:
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.)
- \n displayed instead of newline, lisa-asket, 2021/06/29
- Re: \n displayed instead of newline, Jesse Hathaway, 2021/06/29
- Re: \n displayed instead of newline, Greg Wooledge, 2021/06/29
- \n displayed instead of newline, lisa-asket, 2021/06/30
- \n displayed instead of newline, lisa-asket, 2021/06/30
- Re: \n displayed instead of newline,
Greg Wooledge <=
- \n displayed instead of newline, lisa-asket, 2021/06/30
- Re: \n displayed instead of newline, Greg Wooledge, 2021/06/30
- \n displayed instead of newline, lisa-asket, 2021/06/30
- Re: \n displayed instead of newline, Greg Wooledge, 2021/06/30
- Re: \n displayed instead of newline, Leonid Isaev (ifax), 2021/06/30
- \n displayed instead of newline, lisa-asket, 2021/06/30