Home > other >  show echo command string with spaces and symbols in .zshrc
show echo command string with spaces and symbols in .zshrc

Time:01-31

I try to decorate .zshrc config ASCII Art like this for example. How to show all symbols with gaps in string in a correct and compact way?

 __         __
/  \.-"""-./  \
\    -   -    /
 |   o   o   |
 \  .-'''-.  /
  '-\__Y__/-'
     `---`
echo " __         __ "
echo "/  \.-"""-./  \"
echo "\    -   -    /"
echo " |   o   o   | "
echo " \  .-'''-.  / "
echo "  '-\__Y__/-'  "
echo "     `---`     "

Result: enter image description here

CodePudding user response:

Use a quoted here document.

cat <<'EOF'
 __         __
/  \.-"""-./  \
\    -   -    /
 |   o   o   |
 \ .-'''-.  / 
  '-\__Y__/-'
     `---`
EOF
  •  Tags:  
  • Related