[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] How not to include the trailing newline when <<< is used
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] How not to include the trailing newline when <<< is used? |
Date: |
Wed, 25 May 2016 14:14:18 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, May 25, 2016 at 12:43:49PM -0500, Dan Douglas wrote:
> On Wed, May 25, 2016 at 12:30 PM, Dan Douglas <address@hidden> wrote:
> Er... if using head then I meant this:
>
> $ printf -v x %s%n $'\uE4' lx; head -c "$lx" <<<"$x"; echo " b"
> รค b
I'm pretty sure "No" was the best answer. ;-)
Also, whatever that command is supposed to be, it doesn't work as
written in bash 4.3 on HP-UX:
$ printf -v x %s%n $'\uE4' lx; head -c "$lx" <<<"$x"; echo " b"
4: No such file or directory
b
imadev:~$ declare -p x lx
declare -- x="\\uE4"
declare -- lx="4"
imadev:~$ locale
LANG=en_US.iso88591
LC_CTYPE="en_US.iso88591"
LC_COLLATE="en_US.iso88591"
LC_MONETARY="en_US.iso88591"
LC_NUMERIC="en_US.iso88591"
LC_TIME=POSIX
LC_MESSAGES="en_US.iso88591"
LC_ALL=