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

A hyphen bug or not?



#!/bin/zsh

emulate zsh

R="-"

echo "$R" # <--- its empty here as well !

R=$(echo "$R" | base64)
R=$(print ${R//$'\n'})

echo "R: $R" # <--- this is wrong, it should be a hyphen -

# When we change the "R" variable to a octal presentation of hyphen

R="\055"
R=$(echo "$R" | base64)
R=$(print ${R//$'\n'})

echo "R: $R" # <--- now it works and base64 decod returns a hyphen "-" as
it should.


How I can echo a hyphen without echoing octal?



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