I want to write an alias for every command possible and want to concat "| lolcat" to it and then execute it.
So far I have:
looool () {
command=""
for var in "$@"
do
command="$command $var"
done
command="$command | lolcat"
$command
}
and I test it with adding
looool dmesg
as last line.
The Command as string is dmesg | lolcat
, but the output so far is the help page of dmesg and not the desired colored dmesg.
Thanks in Advance.
The two main problems are that:
Why don't you just do
looool () {
"$@" | lolcat
}
?