LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   echo (https://www.linuxquestions.org/questions/linux-software-2/echo-47917/)

phoeniXflame 03-02-2003 03:58 PM

echo
 
hi guys

I'm writing a shell script and I wanted to include some ASCII art I've created, but when using the echo command to display it, it seems to cut out multiple spaces which kinda screws up the picture :( I did read somewhere that if you place " around the line it stops it removing them, but it just dosnt seem to work , heres the code, thanks in advance !

Code:

LOGO="+==============================================================+\n
|                                          ____              |\n
|                                          |__|              |\n
|    __________ ____      ______            ___      ___    |\n
|    /  _  \ | |  \    /      \---\  /--| |  \    /  /    |\n
|    |  |_|  | |_|  |------\ ___|    \  |  |---  \  /  /      |\n
|    |      |      |  _  | |__      \ |  |  |\  \/  /      |\n
|    |    ___/      |  |_| |  __|  |\  \|  |  | \    /        |\n
|    |  | |  |-|  |      | |__  | \    |  | /    \        |\n
|    |  | |  | |  |------/    |__|  \____|  |/  /\  \      |\n
|    |  | \---- ----/    \______/        |___|  /  \  \      |\n
|    \___/                                    /  /    \__\    |\n
|                                            /__/              |\n
|                                                              |\n
+==============================================================+\n"

#display logo
echo -e $LOGO

that probably dosnt look right on the forums, but you get the idea

Crashed_Again 03-02-2003 04:16 PM

If you use the <tab> key when making these ascii images it can screw it up sometimes. I ran into this myself once. Are you using the <tab> key while creating this?

phoeniXflame 03-02-2003 07:25 PM

hi, thx for replying, no I didnt use the tab key once when creating it, I thought that might be what it was so I purposly didnt use tabs, only spaces, heres what I get on my sceen when running the script ...

Code:

+==============================================================+
 | ____ |
 | |__| |
 | __________ ____ ______ ___ ___ |
 | / _ \ | | \ / \---\ /--| | \ / / |
 | | |_| | |_| |------\ ___| \ | |--- \ / / |
 | | | | _ | |__ \ | | |\ \/ / |
 | | ___/ | |_| | __| |\ \| | | \ / |
 | | | | |-| | | |__ | \ | | / \ |
 | | | | | | |------/ |__| \____| |/ /\ \ |
 | | | \---- ----/ \______/ |___| / \ \ |
 | \___/ / / \__\ |
 | /__/ |
 | |
 +==============================================================+

as you can see, its removed all multiple spaces and replaced them with single ones

Tinkster 03-02-2003 08:23 PM

Gidday!

Try
Code:

echo "$LOGO"

Cheers,
Tink


All times are GMT -5. The time now is 04:38 PM.