help-bash
[Top][All Lists]
Advanced

[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: Wed, 25 May 2016 12:43:49 -0500

On Wed, May 25, 2016 at 12:30 PM, Dan Douglas <address@hidden> wrote:
>  $ ( x=a; head -c "${#x}" <<<"$x"; echo " b" )
> a b

Er... if using head then I meant this:

 $ printf -v x %s%n $'\uE4' lx; head -c "$lx" <<<"$x"; echo " b"
รค b

Depends on what you want to do with the input.



reply via email to

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