|
Those who believe Linux command line is very quiet and boring and no fun people, you are wrong, here are some articles about Linux, which show how the Linux interesting and "naughty."
In this article, I will discuss a little tool called "lolcat" - it can generate a rainbow of colors in the terminal.
Generating output rainbow colors for the terminal command Lolcat
What is the lolcat?
Lolcat is one for Linux, BSD and OSX platform tool, which is similar to cat command and add a rainbow of colors for the output of cat. Lolcat is mainly used in the Linux terminal to add text rainbow colors.
Lolcat installed in Linux
1. Lolcat tool in many Linux distributions repositories will be made available, but some of the old versions are available, and you can git repository to download and install the latest version of lolcat.
Since Lolcat is a ruby gem program, so your system must have the latest version of RUBY.
# Apt-get install ruby [in APT-based system]
# Yum install ruby [in Yum-based system]
# Dnf install ruby [in DNF-based system]
Once ruby package installation is successful, make sure the version of ruby verify the installation.
# Ruby --version
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
2. Then use the following command to download and install the latest version of lolcat lolcat from the git repository.
# Wget https://github.com/busyloop/lolcat/archive/master.zip
# Unzip master.zip
# Cd lolcat-master / bin
# Gem install lolcat
Lolcat Once installed, you can check its version number.
# Lolcat --version
lolcat 42.0.99 (c) 2011 moe@busyloop.net
Lolcat Usage
3. Before you start using lolcat, use the following command to understand the options available to it and its help documentation.
# Lolcat -h
Lolcat help documentation
4. Next, pipe connections lolcat, and other commands, such as ps, date and cal:
# Ps | lolcat
# Date | lolcat
# Cal | lolcat
The output of the ps command
Date output
Calendar of output
5. Use lolcat the code to show a script file:
# Lolcat test.sh
To show the code with lolcat
6. pipelines connecting lolcat and figlet command. Figlet is a showcase application by a conventional screen characters huge string. We can connect the output to a pipe figlet lolcat to demonstrate in the following colorful output:
# Echo I ❤ Tecmint | lolcat
# Figlet Love Tecmint | lolcat
Colorful characters
Note: Note, ❤ is a unicode character. To install figlet, so you need to use to get this package like yum and apt:
# Apt-get figlet
# Yum install figlet
# Dnf install figlet
7. The text given to the colors of the rainbow animation:
$ Echo I ❤Tecmit | lolcat -a -d 500
Moving text
-a Option here refers Animation (animation), -d refers to the duration (duration). In the above example, for 500 times the animation.
8. Read the man page in rainbow colors (for example, man ls):
# Man ls | lolcat
Colorful display file
9. Adoption of the pipe connection lolcat and cowsay. cowsay is thinking or talking cows being a configurable, this program also supports other animals.
Use the following command to install cowsay:
# Apt-get cowsay
# Yum install cowsay
# Dnf install cowsay
After installation, use the following command to display all of the animals in cowsay:
# Cowsay -l
Sample Output
Cow files in / usr / share / cowsay / cows:
apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default
dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep
ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala
mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep
skeleton snowman sodomized-sheep stegosaurus stimpy SUSE three-eyes turkey
turtle tux unipony unipony-smaller vader vader-koala www
And output through a pipe connection lolcat cowsay after, and used 'gnu' image cowfile.
# Cowsay -f gnu Tecmint is the best Linux Resource Available online | lolcat
Lolcat use of Cowsay
NOTE: You can order the lolcat and any other pipe connecting the terminal to get color output.
10. You can build aliases for the most commonly used commands to make the command output showing rainbow colors. So you can create an alias for 'ls -l' command like the following, the command output directory contains a list of contents.
# Alias lolls = "ls -l | lolcat"
# Lolls
Colorful Alias command
You can be as suggested above, create an alias for any command. To make an alias permanent, you need to add the relevant code (the code above is an alias for the ls -l) to ~ / .bashrc file and log out and then log back on to make the change.
Now there is to it. I would like to know if you ever noticed lolcat this tool? Do you like this article? Welcome in the comments below given link your suggestions and feedback. Share and like us, help us spread. |
|
|
|