How to show ascii art at the top of the terminal when it's opened?How can I have my terminal start with an...
Can infringement of a trademark be pursued for using a company's name in a sentence?
What does it mean when multiple 々 marks follow a 、?
Are there situations where a child is permitted to refer to their parent by their first name?
How do anti-virus programs start at Windows boot?
Good allowance savings plan?
Is a lawful good "antagonist" effective?
What is the difference between "shut" and "close"?
What wound would be of little consequence to a biped but terrible for a quadruped?
Replacing Windows 7 security updates with anti-virus?
Do f-stop and exposure time perfectly cancel?
Format picture and text with TikZ and minipage
Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?
How could a female member of a species produce eggs unto death?
Can someone explain this Mudra being done by Ramakrishna Paramhansa in Samadhi?
Prove that the total distance is minimised (when travelling across the longest path)
Is it true that real estate prices mainly go up?
Does Linux have system calls to access all the features of the file systems it supports?
Am I not good enough for you?
Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?
When were linguistics departments first established
Word for a person who has no opinion about whether god exists
Why don't MCU characters ever seem to have language issues?
Making a sword in the stone, in a medieval world without magic
Who is our nearest neighbor
How to show ascii art at the top of the terminal when it's opened?
How can I have my terminal start with an ASCII banner?How to show art in terminalHow to get Ascii Ubuntu logo in terminalHow do I get Guake(terminal) to report the correct terminal?How to set Guake as preferred terminal emulator for “Run in Terminal”?make terminal show up when called in a shell scriptthe output when I start firefox from TerminalHow to search ASCII text with Ubuntu TerminalHow can I open a terminal in the desktop directory?Ascii art animation demo program “bb”: animation freezes when sound output startsusing Terminal command by clicking on a link in an email?How to send e-mails from the terminal?auto edit a text file
As you can see on this screeshot of Mik's Guake he have a statup message of ascii art when he opens it, and that's what I'd like to do, can someone help me?
command-line customization
add a comment |
As you can see on this screeshot of Mik's Guake he have a statup message of ascii art when he opens it, and that's what I'd like to do, can someone help me?
command-line customization
Please see this question, where I explain one way of doing it. Unfortunately, your question is a possible duplicate of that one.
– user76204
Dec 31 '12 at 16:06
@Mik I think my question is a "real" duplicate of this one. Anyway, could you please explain me how to make the text get colored? Is that a argument onecho
?
– Zignd
Dec 31 '12 at 16:15
The prompt is red because I have specified some ANSI escape codes in the PS1 line in my.bash_aliases
; you can do this manually in yourbash_aliases
or.bashrc
for various things. You should also be able to use the preferences ingnome-terminal
orguake
to alter some of the appearance settings. There's some good answers on this site discussing the use of colour and ANSI escape codes in the terminal.
– user76204
Dec 31 '12 at 16:27
add a comment |
As you can see on this screeshot of Mik's Guake he have a statup message of ascii art when he opens it, and that's what I'd like to do, can someone help me?
command-line customization
As you can see on this screeshot of Mik's Guake he have a statup message of ascii art when he opens it, and that's what I'd like to do, can someone help me?
command-line customization
command-line customization
edited Apr 13 '17 at 12:24
Community♦
1
1
asked Dec 31 '12 at 14:21
ZigndZignd
5,411103158
5,411103158
Please see this question, where I explain one way of doing it. Unfortunately, your question is a possible duplicate of that one.
– user76204
Dec 31 '12 at 16:06
@Mik I think my question is a "real" duplicate of this one. Anyway, could you please explain me how to make the text get colored? Is that a argument onecho
?
– Zignd
Dec 31 '12 at 16:15
The prompt is red because I have specified some ANSI escape codes in the PS1 line in my.bash_aliases
; you can do this manually in yourbash_aliases
or.bashrc
for various things. You should also be able to use the preferences ingnome-terminal
orguake
to alter some of the appearance settings. There's some good answers on this site discussing the use of colour and ANSI escape codes in the terminal.
– user76204
Dec 31 '12 at 16:27
add a comment |
Please see this question, where I explain one way of doing it. Unfortunately, your question is a possible duplicate of that one.
– user76204
Dec 31 '12 at 16:06
@Mik I think my question is a "real" duplicate of this one. Anyway, could you please explain me how to make the text get colored? Is that a argument onecho
?
– Zignd
Dec 31 '12 at 16:15
The prompt is red because I have specified some ANSI escape codes in the PS1 line in my.bash_aliases
; you can do this manually in yourbash_aliases
or.bashrc
for various things. You should also be able to use the preferences ingnome-terminal
orguake
to alter some of the appearance settings. There's some good answers on this site discussing the use of colour and ANSI escape codes in the terminal.
– user76204
Dec 31 '12 at 16:27
Please see this question, where I explain one way of doing it. Unfortunately, your question is a possible duplicate of that one.
– user76204
Dec 31 '12 at 16:06
Please see this question, where I explain one way of doing it. Unfortunately, your question is a possible duplicate of that one.
– user76204
Dec 31 '12 at 16:06
@Mik I think my question is a "real" duplicate of this one. Anyway, could you please explain me how to make the text get colored? Is that a argument on
echo
?– Zignd
Dec 31 '12 at 16:15
@Mik I think my question is a "real" duplicate of this one. Anyway, could you please explain me how to make the text get colored? Is that a argument on
echo
?– Zignd
Dec 31 '12 at 16:15
The prompt is red because I have specified some ANSI escape codes in the PS1 line in my
.bash_aliases
; you can do this manually in your bash_aliases
or .bashrc
for various things. You should also be able to use the preferences in gnome-terminal
or guake
to alter some of the appearance settings. There's some good answers on this site discussing the use of colour and ANSI escape codes in the terminal.– user76204
Dec 31 '12 at 16:27
The prompt is red because I have specified some ANSI escape codes in the PS1 line in my
.bash_aliases
; you can do this manually in your bash_aliases
or .bashrc
for various things. You should also be able to use the preferences in gnome-terminal
or guake
to alter some of the appearance settings. There's some good answers on this site discussing the use of colour and ANSI escape codes in the terminal.– user76204
Dec 31 '12 at 16:27
add a comment |
7 Answers
7
active
oldest
votes
Open your terminal with CTRL+ALT+T and type as
nano ~/.bashrc
There type as
echo " Hi Zignd"
then close and save it.
then type this command to reload bashrc .
source ~/.bashrc
You will what you want.
for example :I made my self.
1
Make sure that thisecho
is within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
You can also addscreenfetch
.
– Pablo Bianchi
Jan 31 '18 at 17:01
add a comment |
To extend @snow's answer, put the code below from the very first line of your .bashrc
. And be proud to be ubuntu user :)
echo "MMMMMMMMMMMMKlxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0occlxNM"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKOXMMMMMMMMMMMMMMMMMNdcoxkOlc0"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMdcOMMMMMMMMMMMMMMMMMkoO0lckkcl"
echo "dxWMMMM0d0MMOcoxdooxONMMMOdXMMMMXdkMMWkxdoodxONMMMdcldddkMXdxWMMMM0dKM0coOxk0xcd"
echo "ccNMMMMxckMMOco0XNXkclKMMxc0MMMMKcoMMNllKXXXkclXMMdcxKKKXMKclNMMMMkc0MM0oclldokN"
echo "ccNMMMMxckMMOcxMMMMMOclWMxc0MMMMKcoMMNllWMMMMdcOMMdcOMMMMMKclNMMMMkc0MMMMNXXNWMM"
echo "ccNMMMMxckMMOcxMMMMMKccNMxc0MMMMKcoMMNllWMMMMxckMMdcOMMMMMKclNMMMMkc0MMMMMMMMMMM"
echo "lcKMMMMxckMMOcxMMMMWdcxMMkcxMMMMKcoMMNllWMMMMkckMMxckMMMMMNccKMMMMkc0MMMMMMMMMMM"
echo "0lcxkkklckMMOclkOkxlckWMMNocdkkkdcoMMNllWMMMMkckMMXlcxkkxNM0lcxkkkoc0MMMMMMMMMMM"
echo "MNxlccloxXMMXxolccokNMMMMMWOolclox0MMWxkWMMMM0d0MMMXxlclxNMMNklcclokXMMMMMMMMMMM"
OR
echo " _ _ "
echo " _ _| |__ _ _ _ __ | |_ _ _ "
echo "| | | | '_ | | | | '_ | __| | | |"
echo "| |_| | |_) | |_| | | | | |_| |_| |"
echo " __,_|_.__/ __,_|_| |_|__|__,_|"
The secret to these image like characters is to use an image converter to ASCII characters. There are lots of free tools in the wild like toilet
or figlet
but I personally use jp2a
.
You can also use this site for generating text to ASCII instead of image to ASCII.
+1 for mentioning the site to generate ascii images
– don.joey
Jan 5 '13 at 16:29
+1 for jp2a (why use a website?)
– Vreality
Oct 5 '13 at 0:20
Make sure that theseecho
s are within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
add a comment |
How do we apply ASCII art into the terminal?
There are numerous ways of generating ASCII art, including specialized software and manual building, but, there are also web-sites that generate ASCII art by simply entering the desired name.
first, we need to generate/create the ASCII "code": visit this web-site, type a desired name and copy the "live" generated ASCII result
then, create a text file named art and paste into it the above mentioned generated ASCII result
copy the art file in your home folder (navigate here by clicking Nautilus sidebar's Home)
open the .bashrc file (to make it viewable, press Ctrl+H) and paste on the bottom of the page
cat art
Worth mentioning:
The above mentioned site contains hundreds of different fonts for generating ASCII that feature various sizes, 3D-look, etc.
Source
As for images to ascii go to this website
add a comment |
First generate a ascii drawing. I recommend asciio
:
apt-get install asciio
Example:
.-------.
| Hi |
'-------'
^ (_/)
'----- (O.o)
(> <)
Copy and paste the drawing in file:
vim /home/<youruser>/banner
Finally, add at the end of file to read when you open a new bash:
echo "cat banner" >> /home/<youruser>/.bashrc
Open another terminal:
Can you please translate your answer to English?
– edwinksl
Jul 27 '16 at 2:15
Sorry. I tried.
– Wellington Oliveira
Jul 27 '16 at 2:25
I haven't permission for post images yet. Sorry.
– Wellington Oliveira
Jul 27 '16 at 2:30
That's fine, I am aware of that.
– edwinksl
Jul 27 '16 at 2:31
add a comment |
You can add interesting ASCII arts on your terminal without leaving your terminal. cowsay
has some of the coolest ASCII arts and piping fortune
outputs into cowsay can take this to another level. Lets see how this is done, open your terminal and type:
sudo apt-get install cowsay
Now cowsay is installed lets have some fun, add following command
cowsay I am in a good mooooo-d.
If you don't like the cow, there is a mystical zoo within your terminal, type
cowsay -f dragon Who dared to wake me up?
To bring up list of all the animals in your mystical zoo type cowsay -l
.
If you prefer 'thinking animal' over talking one try
cowthink -f <animal name> <your message>
< >
are to be ignored. If you want to display same custom message each time you login please continue, otherwise skip to next step.
Copy your ASCII art and go to home directory. Create a file
<newfile.txt>
, paste your ASCII art inside the file and save it.
Open a file.bashrc
from home directory. Add the following on bottom
line of the file and save it.
cat <newfile.txt>
You are done :) reopen your terminal.
Lets make your animal a little more intelligent by adding fortune
sudo apt-get install fortune
Go to home directory and open .bashrc
and add the following as top line of the file
fortune | cowsay -f <your animal>
Now save the file and you are done :)
add a comment |
This one takes a png image file and outputs a facsimile onto your terminal
If you have nodejs installed then issue
npm install -g picture-tube
then put this into bottom of your ~/.bashrc
echo "picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png"
picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png
code is at https://github.com/substack/picture-tube
enjoy
add a comment |
sudo apt-get install figlet
echo "Hello world!" | figlet | color_it.sh 54
cat color_it.sh
#!/usr/bin/env bash
## A.M.Danischewski 2015+(c) Free - for (all (uses and
## modifications)) - except you must keep this notice intact.
declare INPUT_TXT=""
declare ADD_LF="n"
declare -i DONE=0
declare -r COLOR_NUMBER="${1:-247}"
declare -r ASCII_FG="\033[38;05;"
declare -r COLOR_OUT="${ASCII_FG}${COLOR_NUMBER}m"
function show_colors() {
## perhaps will add bg 48 to first loop eventually
for fgbg in 38; do for color in {0..256} ; do
echo -en "\033[${fgbg};5;${color}m ${color}t\033[0m";
(($((${color}+1))%10==0)) && echo; done; echo; done
}
if [[ ! $# -eq 1 || ${1} =~ ^-. ]]; then
show_colors
echo " Usage: ${0##*/} <color fg>"
echo " E.g. echo "Hello world!" | figlet | ${0##*/} 54"
else
while IFS= read -r PIPED_INPUT || { DONE=1; ADD_LF=""; }; do
PIPED_INPUT=$(sed 's#\#\\#g' <<< "${PIPED_INPUT}")
INPUT_TXT="${INPUT_TXT}${PIPED_INPUT}${ADD_LF}"
((${DONE})) && break;
done
echo -en "${COLOR_OUT}${INPUT_TXT}\033[00m"
fi
its typical to create a dir ~/bin and make all those files visible
mkdir ~/bin
# ... put above color_it.sh as file ~/bin/color_it.sh
chmod +x ~/bin/color_it.sh # make it executable
export PATH=${HOME}/bin:${PATH} # add this line to your ~/.bashrc
echo "Hello world!" | figlet | color_it.sh 34
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f234678%2fhow-to-show-ascii-art-at-the-top-of-the-terminal-when-its-opened%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
Open your terminal with CTRL+ALT+T and type as
nano ~/.bashrc
There type as
echo " Hi Zignd"
then close and save it.
then type this command to reload bashrc .
source ~/.bashrc
You will what you want.
for example :I made my self.
1
Make sure that thisecho
is within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
You can also addscreenfetch
.
– Pablo Bianchi
Jan 31 '18 at 17:01
add a comment |
Open your terminal with CTRL+ALT+T and type as
nano ~/.bashrc
There type as
echo " Hi Zignd"
then close and save it.
then type this command to reload bashrc .
source ~/.bashrc
You will what you want.
for example :I made my self.
1
Make sure that thisecho
is within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
You can also addscreenfetch
.
– Pablo Bianchi
Jan 31 '18 at 17:01
add a comment |
Open your terminal with CTRL+ALT+T and type as
nano ~/.bashrc
There type as
echo " Hi Zignd"
then close and save it.
then type this command to reload bashrc .
source ~/.bashrc
You will what you want.
for example :I made my self.
Open your terminal with CTRL+ALT+T and type as
nano ~/.bashrc
There type as
echo " Hi Zignd"
then close and save it.
then type this command to reload bashrc .
source ~/.bashrc
You will what you want.
for example :I made my self.
edited Oct 5 '13 at 0:11
answered Dec 31 '12 at 14:42
rɑːdʒɑrɑːdʒɑ
58.5k85218302
58.5k85218302
1
Make sure that thisecho
is within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
You can also addscreenfetch
.
– Pablo Bianchi
Jan 31 '18 at 17:01
add a comment |
1
Make sure that thisecho
is within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
You can also addscreenfetch
.
– Pablo Bianchi
Jan 31 '18 at 17:01
1
1
Make sure that this
echo
is within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.– egmont
Aug 28 '15 at 6:54
Make sure that this
echo
is within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.– egmont
Aug 28 '15 at 6:54
You can also add
screenfetch
.– Pablo Bianchi
Jan 31 '18 at 17:01
You can also add
screenfetch
.– Pablo Bianchi
Jan 31 '18 at 17:01
add a comment |
To extend @snow's answer, put the code below from the very first line of your .bashrc
. And be proud to be ubuntu user :)
echo "MMMMMMMMMMMMKlxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0occlxNM"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKOXMMMMMMMMMMMMMMMMMNdcoxkOlc0"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMdcOMMMMMMMMMMMMMMMMMkoO0lckkcl"
echo "dxWMMMM0d0MMOcoxdooxONMMMOdXMMMMXdkMMWkxdoodxONMMMdcldddkMXdxWMMMM0dKM0coOxk0xcd"
echo "ccNMMMMxckMMOco0XNXkclKMMxc0MMMMKcoMMNllKXXXkclXMMdcxKKKXMKclNMMMMkc0MM0oclldokN"
echo "ccNMMMMxckMMOcxMMMMMOclWMxc0MMMMKcoMMNllWMMMMdcOMMdcOMMMMMKclNMMMMkc0MMMMNXXNWMM"
echo "ccNMMMMxckMMOcxMMMMMKccNMxc0MMMMKcoMMNllWMMMMxckMMdcOMMMMMKclNMMMMkc0MMMMMMMMMMM"
echo "lcKMMMMxckMMOcxMMMMWdcxMMkcxMMMMKcoMMNllWMMMMkckMMxckMMMMMNccKMMMMkc0MMMMMMMMMMM"
echo "0lcxkkklckMMOclkOkxlckWMMNocdkkkdcoMMNllWMMMMkckMMXlcxkkxNM0lcxkkkoc0MMMMMMMMMMM"
echo "MNxlccloxXMMXxolccokNMMMMMWOolclox0MMWxkWMMMM0d0MMMXxlclxNMMNklcclokXMMMMMMMMMMM"
OR
echo " _ _ "
echo " _ _| |__ _ _ _ __ | |_ _ _ "
echo "| | | | '_ | | | | '_ | __| | | |"
echo "| |_| | |_) | |_| | | | | |_| |_| |"
echo " __,_|_.__/ __,_|_| |_|__|__,_|"
The secret to these image like characters is to use an image converter to ASCII characters. There are lots of free tools in the wild like toilet
or figlet
but I personally use jp2a
.
You can also use this site for generating text to ASCII instead of image to ASCII.
+1 for mentioning the site to generate ascii images
– don.joey
Jan 5 '13 at 16:29
+1 for jp2a (why use a website?)
– Vreality
Oct 5 '13 at 0:20
Make sure that theseecho
s are within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
add a comment |
To extend @snow's answer, put the code below from the very first line of your .bashrc
. And be proud to be ubuntu user :)
echo "MMMMMMMMMMMMKlxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0occlxNM"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKOXMMMMMMMMMMMMMMMMMNdcoxkOlc0"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMdcOMMMMMMMMMMMMMMMMMkoO0lckkcl"
echo "dxWMMMM0d0MMOcoxdooxONMMMOdXMMMMXdkMMWkxdoodxONMMMdcldddkMXdxWMMMM0dKM0coOxk0xcd"
echo "ccNMMMMxckMMOco0XNXkclKMMxc0MMMMKcoMMNllKXXXkclXMMdcxKKKXMKclNMMMMkc0MM0oclldokN"
echo "ccNMMMMxckMMOcxMMMMMOclWMxc0MMMMKcoMMNllWMMMMdcOMMdcOMMMMMKclNMMMMkc0MMMMNXXNWMM"
echo "ccNMMMMxckMMOcxMMMMMKccNMxc0MMMMKcoMMNllWMMMMxckMMdcOMMMMMKclNMMMMkc0MMMMMMMMMMM"
echo "lcKMMMMxckMMOcxMMMMWdcxMMkcxMMMMKcoMMNllWMMMMkckMMxckMMMMMNccKMMMMkc0MMMMMMMMMMM"
echo "0lcxkkklckMMOclkOkxlckWMMNocdkkkdcoMMNllWMMMMkckMMXlcxkkxNM0lcxkkkoc0MMMMMMMMMMM"
echo "MNxlccloxXMMXxolccokNMMMMMWOolclox0MMWxkWMMMM0d0MMMXxlclxNMMNklcclokXMMMMMMMMMMM"
OR
echo " _ _ "
echo " _ _| |__ _ _ _ __ | |_ _ _ "
echo "| | | | '_ | | | | '_ | __| | | |"
echo "| |_| | |_) | |_| | | | | |_| |_| |"
echo " __,_|_.__/ __,_|_| |_|__|__,_|"
The secret to these image like characters is to use an image converter to ASCII characters. There are lots of free tools in the wild like toilet
or figlet
but I personally use jp2a
.
You can also use this site for generating text to ASCII instead of image to ASCII.
+1 for mentioning the site to generate ascii images
– don.joey
Jan 5 '13 at 16:29
+1 for jp2a (why use a website?)
– Vreality
Oct 5 '13 at 0:20
Make sure that theseecho
s are within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
add a comment |
To extend @snow's answer, put the code below from the very first line of your .bashrc
. And be proud to be ubuntu user :)
echo "MMMMMMMMMMMMKlxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0occlxNM"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKOXMMMMMMMMMMMMMMMMMNdcoxkOlc0"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMdcOMMMMMMMMMMMMMMMMMkoO0lckkcl"
echo "dxWMMMM0d0MMOcoxdooxONMMMOdXMMMMXdkMMWkxdoodxONMMMdcldddkMXdxWMMMM0dKM0coOxk0xcd"
echo "ccNMMMMxckMMOco0XNXkclKMMxc0MMMMKcoMMNllKXXXkclXMMdcxKKKXMKclNMMMMkc0MM0oclldokN"
echo "ccNMMMMxckMMOcxMMMMMOclWMxc0MMMMKcoMMNllWMMMMdcOMMdcOMMMMMKclNMMMMkc0MMMMNXXNWMM"
echo "ccNMMMMxckMMOcxMMMMMKccNMxc0MMMMKcoMMNllWMMMMxckMMdcOMMMMMKclNMMMMkc0MMMMMMMMMMM"
echo "lcKMMMMxckMMOcxMMMMWdcxMMkcxMMMMKcoMMNllWMMMMkckMMxckMMMMMNccKMMMMkc0MMMMMMMMMMM"
echo "0lcxkkklckMMOclkOkxlckWMMNocdkkkdcoMMNllWMMMMkckMMXlcxkkxNM0lcxkkkoc0MMMMMMMMMMM"
echo "MNxlccloxXMMXxolccokNMMMMMWOolclox0MMWxkWMMMM0d0MMMXxlclxNMMNklcclokXMMMMMMMMMMM"
OR
echo " _ _ "
echo " _ _| |__ _ _ _ __ | |_ _ _ "
echo "| | | | '_ | | | | '_ | __| | | |"
echo "| |_| | |_) | |_| | | | | |_| |_| |"
echo " __,_|_.__/ __,_|_| |_|__|__,_|"
The secret to these image like characters is to use an image converter to ASCII characters. There are lots of free tools in the wild like toilet
or figlet
but I personally use jp2a
.
You can also use this site for generating text to ASCII instead of image to ASCII.
To extend @snow's answer, put the code below from the very first line of your .bashrc
. And be proud to be ubuntu user :)
echo "MMMMMMMMMMMMKlxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0occlxNM"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKOXMMMMMMMMMMMMMMMMMNdcoxkOlc0"
echo "MMMMMMMMMMMMOcxMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMdcOMMMMMMMMMMMMMMMMMkoO0lckkcl"
echo "dxWMMMM0d0MMOcoxdooxONMMMOdXMMMMXdkMMWkxdoodxONMMMdcldddkMXdxWMMMM0dKM0coOxk0xcd"
echo "ccNMMMMxckMMOco0XNXkclKMMxc0MMMMKcoMMNllKXXXkclXMMdcxKKKXMKclNMMMMkc0MM0oclldokN"
echo "ccNMMMMxckMMOcxMMMMMOclWMxc0MMMMKcoMMNllWMMMMdcOMMdcOMMMMMKclNMMMMkc0MMMMNXXNWMM"
echo "ccNMMMMxckMMOcxMMMMMKccNMxc0MMMMKcoMMNllWMMMMxckMMdcOMMMMMKclNMMMMkc0MMMMMMMMMMM"
echo "lcKMMMMxckMMOcxMMMMWdcxMMkcxMMMMKcoMMNllWMMMMkckMMxckMMMMMNccKMMMMkc0MMMMMMMMMMM"
echo "0lcxkkklckMMOclkOkxlckWMMNocdkkkdcoMMNllWMMMMkckMMXlcxkkxNM0lcxkkkoc0MMMMMMMMMMM"
echo "MNxlccloxXMMXxolccokNMMMMMWOolclox0MMWxkWMMMM0d0MMMXxlclxNMMNklcclokXMMMMMMMMMMM"
OR
echo " _ _ "
echo " _ _| |__ _ _ _ __ | |_ _ _ "
echo "| | | | '_ | | | | '_ | __| | | |"
echo "| |_| | |_) | |_| | | | | |_| |_| |"
echo " __,_|_.__/ __,_|_| |_|__|__,_|"
The secret to these image like characters is to use an image converter to ASCII characters. There are lots of free tools in the wild like toilet
or figlet
but I personally use jp2a
.
You can also use this site for generating text to ASCII instead of image to ASCII.
edited 25 mins ago
Pablo Bianchi
2,92521535
2,92521535
answered Dec 31 '12 at 15:00
nickanornickanor
824610
824610
+1 for mentioning the site to generate ascii images
– don.joey
Jan 5 '13 at 16:29
+1 for jp2a (why use a website?)
– Vreality
Oct 5 '13 at 0:20
Make sure that theseecho
s are within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
add a comment |
+1 for mentioning the site to generate ascii images
– don.joey
Jan 5 '13 at 16:29
+1 for jp2a (why use a website?)
– Vreality
Oct 5 '13 at 0:20
Make sure that theseecho
s are within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.
– egmont
Aug 28 '15 at 6:54
+1 for mentioning the site to generate ascii images
– don.joey
Jan 5 '13 at 16:29
+1 for mentioning the site to generate ascii images
– don.joey
Jan 5 '13 at 16:29
+1 for jp2a (why use a website?)
– Vreality
Oct 5 '13 at 0:20
+1 for jp2a (why use a website?)
– Vreality
Oct 5 '13 at 0:20
Make sure that these
echo
s are within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.– egmont
Aug 28 '15 at 6:54
Make sure that these
echo
s are within a condition that checks that the output is a tty, or (your choice) the shell is interactive. Otherwise you'll break scp, rsync.– egmont
Aug 28 '15 at 6:54
add a comment |
How do we apply ASCII art into the terminal?
There are numerous ways of generating ASCII art, including specialized software and manual building, but, there are also web-sites that generate ASCII art by simply entering the desired name.
first, we need to generate/create the ASCII "code": visit this web-site, type a desired name and copy the "live" generated ASCII result
then, create a text file named art and paste into it the above mentioned generated ASCII result
copy the art file in your home folder (navigate here by clicking Nautilus sidebar's Home)
open the .bashrc file (to make it viewable, press Ctrl+H) and paste on the bottom of the page
cat art
Worth mentioning:
The above mentioned site contains hundreds of different fonts for generating ASCII that feature various sizes, 3D-look, etc.
Source
As for images to ascii go to this website
add a comment |
How do we apply ASCII art into the terminal?
There are numerous ways of generating ASCII art, including specialized software and manual building, but, there are also web-sites that generate ASCII art by simply entering the desired name.
first, we need to generate/create the ASCII "code": visit this web-site, type a desired name and copy the "live" generated ASCII result
then, create a text file named art and paste into it the above mentioned generated ASCII result
copy the art file in your home folder (navigate here by clicking Nautilus sidebar's Home)
open the .bashrc file (to make it viewable, press Ctrl+H) and paste on the bottom of the page
cat art
Worth mentioning:
The above mentioned site contains hundreds of different fonts for generating ASCII that feature various sizes, 3D-look, etc.
Source
As for images to ascii go to this website
add a comment |
How do we apply ASCII art into the terminal?
There are numerous ways of generating ASCII art, including specialized software and manual building, but, there are also web-sites that generate ASCII art by simply entering the desired name.
first, we need to generate/create the ASCII "code": visit this web-site, type a desired name and copy the "live" generated ASCII result
then, create a text file named art and paste into it the above mentioned generated ASCII result
copy the art file in your home folder (navigate here by clicking Nautilus sidebar's Home)
open the .bashrc file (to make it viewable, press Ctrl+H) and paste on the bottom of the page
cat art
Worth mentioning:
The above mentioned site contains hundreds of different fonts for generating ASCII that feature various sizes, 3D-look, etc.
Source
As for images to ascii go to this website
How do we apply ASCII art into the terminal?
There are numerous ways of generating ASCII art, including specialized software and manual building, but, there are also web-sites that generate ASCII art by simply entering the desired name.
first, we need to generate/create the ASCII "code": visit this web-site, type a desired name and copy the "live" generated ASCII result
then, create a text file named art and paste into it the above mentioned generated ASCII result
copy the art file in your home folder (navigate here by clicking Nautilus sidebar's Home)
open the .bashrc file (to make it viewable, press Ctrl+H) and paste on the bottom of the page
cat art
Worth mentioning:
The above mentioned site contains hundreds of different fonts for generating ASCII that feature various sizes, 3D-look, etc.
Source
As for images to ascii go to this website
edited Mar 10 '13 at 4:31
answered Mar 10 '13 at 4:24
Paul AcidSpoof CarissimoPaul AcidSpoof Carissimo
13115
13115
add a comment |
add a comment |
First generate a ascii drawing. I recommend asciio
:
apt-get install asciio
Example:
.-------.
| Hi |
'-------'
^ (_/)
'----- (O.o)
(> <)
Copy and paste the drawing in file:
vim /home/<youruser>/banner
Finally, add at the end of file to read when you open a new bash:
echo "cat banner" >> /home/<youruser>/.bashrc
Open another terminal:
Can you please translate your answer to English?
– edwinksl
Jul 27 '16 at 2:15
Sorry. I tried.
– Wellington Oliveira
Jul 27 '16 at 2:25
I haven't permission for post images yet. Sorry.
– Wellington Oliveira
Jul 27 '16 at 2:30
That's fine, I am aware of that.
– edwinksl
Jul 27 '16 at 2:31
add a comment |
First generate a ascii drawing. I recommend asciio
:
apt-get install asciio
Example:
.-------.
| Hi |
'-------'
^ (_/)
'----- (O.o)
(> <)
Copy and paste the drawing in file:
vim /home/<youruser>/banner
Finally, add at the end of file to read when you open a new bash:
echo "cat banner" >> /home/<youruser>/.bashrc
Open another terminal:
Can you please translate your answer to English?
– edwinksl
Jul 27 '16 at 2:15
Sorry. I tried.
– Wellington Oliveira
Jul 27 '16 at 2:25
I haven't permission for post images yet. Sorry.
– Wellington Oliveira
Jul 27 '16 at 2:30
That's fine, I am aware of that.
– edwinksl
Jul 27 '16 at 2:31
add a comment |
First generate a ascii drawing. I recommend asciio
:
apt-get install asciio
Example:
.-------.
| Hi |
'-------'
^ (_/)
'----- (O.o)
(> <)
Copy and paste the drawing in file:
vim /home/<youruser>/banner
Finally, add at the end of file to read when you open a new bash:
echo "cat banner" >> /home/<youruser>/.bashrc
Open another terminal:
First generate a ascii drawing. I recommend asciio
:
apt-get install asciio
Example:
.-------.
| Hi |
'-------'
^ (_/)
'----- (O.o)
(> <)
Copy and paste the drawing in file:
vim /home/<youruser>/banner
Finally, add at the end of file to read when you open a new bash:
echo "cat banner" >> /home/<youruser>/.bashrc
Open another terminal:
edited Jul 27 '16 at 2:27
edwinksl
17.2k125487
17.2k125487
answered Jul 27 '16 at 2:14
Wellington OliveiraWellington Oliveira
664
664
Can you please translate your answer to English?
– edwinksl
Jul 27 '16 at 2:15
Sorry. I tried.
– Wellington Oliveira
Jul 27 '16 at 2:25
I haven't permission for post images yet. Sorry.
– Wellington Oliveira
Jul 27 '16 at 2:30
That's fine, I am aware of that.
– edwinksl
Jul 27 '16 at 2:31
add a comment |
Can you please translate your answer to English?
– edwinksl
Jul 27 '16 at 2:15
Sorry. I tried.
– Wellington Oliveira
Jul 27 '16 at 2:25
I haven't permission for post images yet. Sorry.
– Wellington Oliveira
Jul 27 '16 at 2:30
That's fine, I am aware of that.
– edwinksl
Jul 27 '16 at 2:31
Can you please translate your answer to English?
– edwinksl
Jul 27 '16 at 2:15
Can you please translate your answer to English?
– edwinksl
Jul 27 '16 at 2:15
Sorry. I tried.
– Wellington Oliveira
Jul 27 '16 at 2:25
Sorry. I tried.
– Wellington Oliveira
Jul 27 '16 at 2:25
I haven't permission for post images yet. Sorry.
– Wellington Oliveira
Jul 27 '16 at 2:30
I haven't permission for post images yet. Sorry.
– Wellington Oliveira
Jul 27 '16 at 2:30
That's fine, I am aware of that.
– edwinksl
Jul 27 '16 at 2:31
That's fine, I am aware of that.
– edwinksl
Jul 27 '16 at 2:31
add a comment |
You can add interesting ASCII arts on your terminal without leaving your terminal. cowsay
has some of the coolest ASCII arts and piping fortune
outputs into cowsay can take this to another level. Lets see how this is done, open your terminal and type:
sudo apt-get install cowsay
Now cowsay is installed lets have some fun, add following command
cowsay I am in a good mooooo-d.
If you don't like the cow, there is a mystical zoo within your terminal, type
cowsay -f dragon Who dared to wake me up?
To bring up list of all the animals in your mystical zoo type cowsay -l
.
If you prefer 'thinking animal' over talking one try
cowthink -f <animal name> <your message>
< >
are to be ignored. If you want to display same custom message each time you login please continue, otherwise skip to next step.
Copy your ASCII art and go to home directory. Create a file
<newfile.txt>
, paste your ASCII art inside the file and save it.
Open a file.bashrc
from home directory. Add the following on bottom
line of the file and save it.
cat <newfile.txt>
You are done :) reopen your terminal.
Lets make your animal a little more intelligent by adding fortune
sudo apt-get install fortune
Go to home directory and open .bashrc
and add the following as top line of the file
fortune | cowsay -f <your animal>
Now save the file and you are done :)
add a comment |
You can add interesting ASCII arts on your terminal without leaving your terminal. cowsay
has some of the coolest ASCII arts and piping fortune
outputs into cowsay can take this to another level. Lets see how this is done, open your terminal and type:
sudo apt-get install cowsay
Now cowsay is installed lets have some fun, add following command
cowsay I am in a good mooooo-d.
If you don't like the cow, there is a mystical zoo within your terminal, type
cowsay -f dragon Who dared to wake me up?
To bring up list of all the animals in your mystical zoo type cowsay -l
.
If you prefer 'thinking animal' over talking one try
cowthink -f <animal name> <your message>
< >
are to be ignored. If you want to display same custom message each time you login please continue, otherwise skip to next step.
Copy your ASCII art and go to home directory. Create a file
<newfile.txt>
, paste your ASCII art inside the file and save it.
Open a file.bashrc
from home directory. Add the following on bottom
line of the file and save it.
cat <newfile.txt>
You are done :) reopen your terminal.
Lets make your animal a little more intelligent by adding fortune
sudo apt-get install fortune
Go to home directory and open .bashrc
and add the following as top line of the file
fortune | cowsay -f <your animal>
Now save the file and you are done :)
add a comment |
You can add interesting ASCII arts on your terminal without leaving your terminal. cowsay
has some of the coolest ASCII arts and piping fortune
outputs into cowsay can take this to another level. Lets see how this is done, open your terminal and type:
sudo apt-get install cowsay
Now cowsay is installed lets have some fun, add following command
cowsay I am in a good mooooo-d.
If you don't like the cow, there is a mystical zoo within your terminal, type
cowsay -f dragon Who dared to wake me up?
To bring up list of all the animals in your mystical zoo type cowsay -l
.
If you prefer 'thinking animal' over talking one try
cowthink -f <animal name> <your message>
< >
are to be ignored. If you want to display same custom message each time you login please continue, otherwise skip to next step.
Copy your ASCII art and go to home directory. Create a file
<newfile.txt>
, paste your ASCII art inside the file and save it.
Open a file.bashrc
from home directory. Add the following on bottom
line of the file and save it.
cat <newfile.txt>
You are done :) reopen your terminal.
Lets make your animal a little more intelligent by adding fortune
sudo apt-get install fortune
Go to home directory and open .bashrc
and add the following as top line of the file
fortune | cowsay -f <your animal>
Now save the file and you are done :)
You can add interesting ASCII arts on your terminal without leaving your terminal. cowsay
has some of the coolest ASCII arts and piping fortune
outputs into cowsay can take this to another level. Lets see how this is done, open your terminal and type:
sudo apt-get install cowsay
Now cowsay is installed lets have some fun, add following command
cowsay I am in a good mooooo-d.
If you don't like the cow, there is a mystical zoo within your terminal, type
cowsay -f dragon Who dared to wake me up?
To bring up list of all the animals in your mystical zoo type cowsay -l
.
If you prefer 'thinking animal' over talking one try
cowthink -f <animal name> <your message>
< >
are to be ignored. If you want to display same custom message each time you login please continue, otherwise skip to next step.
Copy your ASCII art and go to home directory. Create a file
<newfile.txt>
, paste your ASCII art inside the file and save it.
Open a file.bashrc
from home directory. Add the following on bottom
line of the file and save it.
cat <newfile.txt>
You are done :) reopen your terminal.
Lets make your animal a little more intelligent by adding fortune
sudo apt-get install fortune
Go to home directory and open .bashrc
and add the following as top line of the file
fortune | cowsay -f <your animal>
Now save the file and you are done :)
edited Aug 27 '15 at 18:34
answered Aug 27 '15 at 13:37
WireGhostWireGhost
313
313
add a comment |
add a comment |
This one takes a png image file and outputs a facsimile onto your terminal
If you have nodejs installed then issue
npm install -g picture-tube
then put this into bottom of your ~/.bashrc
echo "picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png"
picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png
code is at https://github.com/substack/picture-tube
enjoy
add a comment |
This one takes a png image file and outputs a facsimile onto your terminal
If you have nodejs installed then issue
npm install -g picture-tube
then put this into bottom of your ~/.bashrc
echo "picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png"
picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png
code is at https://github.com/substack/picture-tube
enjoy
add a comment |
This one takes a png image file and outputs a facsimile onto your terminal
If you have nodejs installed then issue
npm install -g picture-tube
then put this into bottom of your ~/.bashrc
echo "picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png"
picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png
code is at https://github.com/substack/picture-tube
enjoy
This one takes a png image file and outputs a facsimile onto your terminal
If you have nodejs installed then issue
npm install -g picture-tube
then put this into bottom of your ~/.bashrc
echo "picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png"
picture-tube --cols 60 /tmp/justpng/orbifold_333_shell.png
code is at https://github.com/substack/picture-tube
enjoy
edited Oct 18 '16 at 14:44
answered Aug 6 '16 at 1:12
Scott StenslandScott Stensland
5,00242242
5,00242242
add a comment |
add a comment |
sudo apt-get install figlet
echo "Hello world!" | figlet | color_it.sh 54
cat color_it.sh
#!/usr/bin/env bash
## A.M.Danischewski 2015+(c) Free - for (all (uses and
## modifications)) - except you must keep this notice intact.
declare INPUT_TXT=""
declare ADD_LF="n"
declare -i DONE=0
declare -r COLOR_NUMBER="${1:-247}"
declare -r ASCII_FG="\033[38;05;"
declare -r COLOR_OUT="${ASCII_FG}${COLOR_NUMBER}m"
function show_colors() {
## perhaps will add bg 48 to first loop eventually
for fgbg in 38; do for color in {0..256} ; do
echo -en "\033[${fgbg};5;${color}m ${color}t\033[0m";
(($((${color}+1))%10==0)) && echo; done; echo; done
}
if [[ ! $# -eq 1 || ${1} =~ ^-. ]]; then
show_colors
echo " Usage: ${0##*/} <color fg>"
echo " E.g. echo "Hello world!" | figlet | ${0##*/} 54"
else
while IFS= read -r PIPED_INPUT || { DONE=1; ADD_LF=""; }; do
PIPED_INPUT=$(sed 's#\#\\#g' <<< "${PIPED_INPUT}")
INPUT_TXT="${INPUT_TXT}${PIPED_INPUT}${ADD_LF}"
((${DONE})) && break;
done
echo -en "${COLOR_OUT}${INPUT_TXT}\033[00m"
fi
its typical to create a dir ~/bin and make all those files visible
mkdir ~/bin
# ... put above color_it.sh as file ~/bin/color_it.sh
chmod +x ~/bin/color_it.sh # make it executable
export PATH=${HOME}/bin:${PATH} # add this line to your ~/.bashrc
echo "Hello world!" | figlet | color_it.sh 34
add a comment |
sudo apt-get install figlet
echo "Hello world!" | figlet | color_it.sh 54
cat color_it.sh
#!/usr/bin/env bash
## A.M.Danischewski 2015+(c) Free - for (all (uses and
## modifications)) - except you must keep this notice intact.
declare INPUT_TXT=""
declare ADD_LF="n"
declare -i DONE=0
declare -r COLOR_NUMBER="${1:-247}"
declare -r ASCII_FG="\033[38;05;"
declare -r COLOR_OUT="${ASCII_FG}${COLOR_NUMBER}m"
function show_colors() {
## perhaps will add bg 48 to first loop eventually
for fgbg in 38; do for color in {0..256} ; do
echo -en "\033[${fgbg};5;${color}m ${color}t\033[0m";
(($((${color}+1))%10==0)) && echo; done; echo; done
}
if [[ ! $# -eq 1 || ${1} =~ ^-. ]]; then
show_colors
echo " Usage: ${0##*/} <color fg>"
echo " E.g. echo "Hello world!" | figlet | ${0##*/} 54"
else
while IFS= read -r PIPED_INPUT || { DONE=1; ADD_LF=""; }; do
PIPED_INPUT=$(sed 's#\#\\#g' <<< "${PIPED_INPUT}")
INPUT_TXT="${INPUT_TXT}${PIPED_INPUT}${ADD_LF}"
((${DONE})) && break;
done
echo -en "${COLOR_OUT}${INPUT_TXT}\033[00m"
fi
its typical to create a dir ~/bin and make all those files visible
mkdir ~/bin
# ... put above color_it.sh as file ~/bin/color_it.sh
chmod +x ~/bin/color_it.sh # make it executable
export PATH=${HOME}/bin:${PATH} # add this line to your ~/.bashrc
echo "Hello world!" | figlet | color_it.sh 34
add a comment |
sudo apt-get install figlet
echo "Hello world!" | figlet | color_it.sh 54
cat color_it.sh
#!/usr/bin/env bash
## A.M.Danischewski 2015+(c) Free - for (all (uses and
## modifications)) - except you must keep this notice intact.
declare INPUT_TXT=""
declare ADD_LF="n"
declare -i DONE=0
declare -r COLOR_NUMBER="${1:-247}"
declare -r ASCII_FG="\033[38;05;"
declare -r COLOR_OUT="${ASCII_FG}${COLOR_NUMBER}m"
function show_colors() {
## perhaps will add bg 48 to first loop eventually
for fgbg in 38; do for color in {0..256} ; do
echo -en "\033[${fgbg};5;${color}m ${color}t\033[0m";
(($((${color}+1))%10==0)) && echo; done; echo; done
}
if [[ ! $# -eq 1 || ${1} =~ ^-. ]]; then
show_colors
echo " Usage: ${0##*/} <color fg>"
echo " E.g. echo "Hello world!" | figlet | ${0##*/} 54"
else
while IFS= read -r PIPED_INPUT || { DONE=1; ADD_LF=""; }; do
PIPED_INPUT=$(sed 's#\#\\#g' <<< "${PIPED_INPUT}")
INPUT_TXT="${INPUT_TXT}${PIPED_INPUT}${ADD_LF}"
((${DONE})) && break;
done
echo -en "${COLOR_OUT}${INPUT_TXT}\033[00m"
fi
its typical to create a dir ~/bin and make all those files visible
mkdir ~/bin
# ... put above color_it.sh as file ~/bin/color_it.sh
chmod +x ~/bin/color_it.sh # make it executable
export PATH=${HOME}/bin:${PATH} # add this line to your ~/.bashrc
echo "Hello world!" | figlet | color_it.sh 34
sudo apt-get install figlet
echo "Hello world!" | figlet | color_it.sh 54
cat color_it.sh
#!/usr/bin/env bash
## A.M.Danischewski 2015+(c) Free - for (all (uses and
## modifications)) - except you must keep this notice intact.
declare INPUT_TXT=""
declare ADD_LF="n"
declare -i DONE=0
declare -r COLOR_NUMBER="${1:-247}"
declare -r ASCII_FG="\033[38;05;"
declare -r COLOR_OUT="${ASCII_FG}${COLOR_NUMBER}m"
function show_colors() {
## perhaps will add bg 48 to first loop eventually
for fgbg in 38; do for color in {0..256} ; do
echo -en "\033[${fgbg};5;${color}m ${color}t\033[0m";
(($((${color}+1))%10==0)) && echo; done; echo; done
}
if [[ ! $# -eq 1 || ${1} =~ ^-. ]]; then
show_colors
echo " Usage: ${0##*/} <color fg>"
echo " E.g. echo "Hello world!" | figlet | ${0##*/} 54"
else
while IFS= read -r PIPED_INPUT || { DONE=1; ADD_LF=""; }; do
PIPED_INPUT=$(sed 's#\#\\#g' <<< "${PIPED_INPUT}")
INPUT_TXT="${INPUT_TXT}${PIPED_INPUT}${ADD_LF}"
((${DONE})) && break;
done
echo -en "${COLOR_OUT}${INPUT_TXT}\033[00m"
fi
its typical to create a dir ~/bin and make all those files visible
mkdir ~/bin
# ... put above color_it.sh as file ~/bin/color_it.sh
chmod +x ~/bin/color_it.sh # make it executable
export PATH=${HOME}/bin:${PATH} # add this line to your ~/.bashrc
echo "Hello world!" | figlet | color_it.sh 34
edited Jan 25 '17 at 18:28
answered Aug 20 '16 at 4:25
Scott StenslandScott Stensland
5,00242242
5,00242242
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f234678%2fhow-to-show-ascii-art-at-the-top-of-the-terminal-when-its-opened%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please see this question, where I explain one way of doing it. Unfortunately, your question is a possible duplicate of that one.
– user76204
Dec 31 '12 at 16:06
@Mik I think my question is a "real" duplicate of this one. Anyway, could you please explain me how to make the text get colored? Is that a argument on
echo
?– Zignd
Dec 31 '12 at 16:15
The prompt is red because I have specified some ANSI escape codes in the PS1 line in my
.bash_aliases
; you can do this manually in yourbash_aliases
or.bashrc
for various things. You should also be able to use the preferences ingnome-terminal
orguake
to alter some of the appearance settings. There's some good answers on this site discussing the use of colour and ANSI escape codes in the terminal.– user76204
Dec 31 '12 at 16:27