I am trying to make a custom MOTD header using a tcl file. I've already been succuessful in adding the commands to the last line of the /etc/profile
cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1) $(whoami), $(fortune)
I want to add this into my existing MOTD but I do not know the proper syntax to exec multiple commands without the pipe break command. As you can see below I have tried:
#!/usr/bin/env tclsh
# * Variable
set cows [exec -- /usr/bin/whoami | /usr/games/fortune | cowsay]
# * Output
puts "$cows"
which outputs the fortune and cowsay fine but, I cannot seem to get the whoami command to exec up with the other commands.
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Any help regarding how multiple commands are executed from within the syntax of the tcl format would greatly be appreciated, thanks y'all.