Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Strip a Carriage-Return from a string/variable



Peter Stephenson wrote in news:200908251612.n7PGCkki001668@xxxxxxxxxxxxxx:

> zzapper wrote:

> % foo=$'bar\r'
> % print $foo | xxd
> 0000000: 6261 720d 0a                             bar..
> % print ${foo%%$'\r'} | xxd
> 0000000: 6261 720a                                bar.
> 
Thanks Peter
And anywhere in the variable/any number of times?


-- 
zzapper



Messages sorted by: Reverse Date, Date, Thread, Author