[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: |
Dan Douglas |
Subject: |
Re: [Help-bash] How not to include the trailing newline when <<< is used? |
Date: |
Thu, 26 May 2016 09:19:14 -0500 |
On Thu, May 26, 2016 at 7:17 AM, Greg Wooledge <address@hidden> wrote:
> This one works better, and is more portable:
>
> imadev:~$ dd bs=4 count=1 2>/dev/null <<< 'hell'; echo o
> hello
True, dd (and wc -c because printf(1) doesn't require %n) would have
been the portable choices if I were so inclined.
> I still prefer "No".
I knew you'd like it. :)