Skip to main content

Unknown parent

friendica (DFRN) - Link to source
Unus Nemo

@plan-A

why would you go through all that? If you are concerned about someone knowing what your user name is for some reason then just rewrite the motd like this:

#!/usr/bin/env bash

figlet "Hello" | lolcat -b
fortune -a | cowsay -f dragon | lolcat -b

I am not exactly concerned about people knowing what my user name is. There is no way they can use that in any scenario to effect me. I literally use the same name here.

In any case dropping the $(whoami | perl -e 'print ucfirst(<>);') (as this is the code that retrieves and displays your username with the first letter capitalized) out of the first figlet line will prevent the script from displaying your username.

The original motd I shared with you:

#!/usr/bin/env bash

figlet "Hello $(whoami | perl -e 'print ucfirst(<>);')" | lolcat -b
fortune -a | cowsay -f dragon | lolcat -b
This entry was edited (2 weeks ago)
Unknown parent

friendica (DFRN) - Link to source
Unus Nemo

@plan-A

why would you write code just to write more code to eliminate what you just generated? That makes no sense at all. Just eliminate the whoami and you do not need to filter its results out with awk. Remember KISS (Keep It Simple Silly).