Here you can just talk about MX or post interesting topics about what you have done in MX that you want to share with others. Other non-MX topics can be discussed within the Rules of the Forum.
operadude
Posts: 1074 Joined: Tue Nov 05, 2019 12:08 am
#11
Post
by operadude » Wed Jun 25, 2025 11:14 am
CharlesV wrote: Wed Jun 25, 2025 10:55 am
Well.. i sure havnt been able to find anything on this forum on that.
Some progress I've made on my own...
Took me a long time to figure-out how to signal the END of stdin...
Quick Search: ^D (NOT ^C !!!)
So, here's my line-by-line input to stdin followed by ^D:
Code: Select all
opera-dude@GA-H270-HD3:~
$ cowthink -d
Looks Like a DEAD Cow !!!
Or...Is it just MOSTLY dead ???
Hitting /^D now...
_________________________________
( Looks Like a DEAD Cow !!! )
( )
( Or...Is it just MOSTLY dead ??? )
( )
( Hitting ^D now... )
---------------------------------
o ^__^
o (xx)\_______
(__)\ )\/\
U ||----w |
|| ||
Still not the ever-expanding Cow that I think I remember seeing somewhere here...
Maybe it was just a dream...
Hey Forum...What IS The Matrix ?
Nokkaelaein
Posts: 385 Joined: Fri Jul 17, 2020 10:32 am
#12
Post
by Nokkaelaein » Wed Jun 25, 2025 11:15 am
Code: Select all
_________________________________________
/ \
| _______________________________________ |
| / I wonder if I can say this like a cow |
| \ \ already said it... Oh no! / |
| |
| --------------------------------------- |
| |
| \ ^__^ |
| |
| \ (oo)\_______ |
| |
| (__)\ )\/\ |
| |
| ||----w | |
| |
\ || || /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
operadude
Posts: 1074 Joined: Tue Nov 05, 2019 12:08 am
#13
Post
by operadude » Wed Jun 25, 2025 11:23 am
Nokkaelaein wrote: Wed Jun 25, 2025 11:15 am
Code: Select all
_________________________________________
/ \
| _______________________________________ |
| / I wonder if I can say this like a cow |
| \ \ already said it... Oh no! / |
| |
| --------------------------------------- |
| |
| \ ^__^ |
| |
| \ (oo)\_______ |
| |
| (__)\ )\/\ |
| |
| ||----w | |
| |
\ || || /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Dude
I think THAT'S what I remember:
Like ever-expanding messages from the Cow
Are you willing to reveal your secret method ???
Nokkaelaein
Posts: 385 Joined: Fri Jul 17, 2020 10:32 am
#14
Post
by Nokkaelaein » Wed Jun 25, 2025 11:29 am
operadude wrote: Wed Jun 25, 2025 11:23 am
Are you willing to reveal your secret method ???
That's the (broken) output of cowsay piped into another cowsay from stdin. Just a spontaneous self-referential joke about the line breakage :')
Add another cowsay with
after your regular cowsay, and so on.
operadude
Posts: 1074 Joined: Tue Nov 05, 2019 12:08 am
#15
Post
by operadude » Wed Jun 25, 2025 11:31 am
Nokkaelaein wrote: Wed Jun 25, 2025 11:29 am
operadude wrote: Wed Jun 25, 2025 11:23 am
Are you willing to reveal your secret method ???
That's the (broken) output of cowsay piped into another cowsay from stdin. Just a spontaneous self-referential joke about the line breakage :')
Add another cowsay with
after your regular cowsay, and so on.
On it
Stand by for progress report...
Nokkaelaein
Posts: 385 Joined: Fri Jul 17, 2020 10:32 am
#16
Post
by Nokkaelaein » Wed Jun 25, 2025 11:34 am
operadude wrote: Wed Jun 25, 2025 11:31 am
Stand by for progress report...
:)
Use the -n switch if you want to see a non-broken cow.
operadude
Posts: 1074 Joined: Tue Nov 05, 2019 12:08 am
#17
Post
by operadude » Wed Jun 25, 2025 11:42 am
@Nokkaelaein
Code: Select all
opera-dude@GA-H270-HD3:~
$ cowsay | cowsay
I am thinking of a cow...thinking of a cow
_________________________________________
/ \
| _______________________________________ |
| _ / I am thinking of a cow...thinking |
| of a \ \ cow / |
| |
| --------------------------------------- |
| - |
| |
| \ ^__^ |
| |
| \ (oo)\_______ |
| |
| (__)\ )\/\ |
| |
| ||----w | |
| |
\ || || /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Any way I can "pipe" into a new "cowsay" on another line of stdin ?
Or, do the self-referential cowsays have to be all on the first line?
I still have a vague recollection of adding to either the cow itself, or the messages, on a new line of the Terminal...
Nokkaelaein
Posts: 385 Joined: Fri Jul 17, 2020 10:32 am
#18
Post
by Nokkaelaein » Wed Jun 25, 2025 11:46 am
operadude wrote: Wed Jun 25, 2025 11:42 am
I still have a vague recollection of adding to either the cow itself, or the messages, on a new line of the Terminal...
Anything goes that you can do with stdin otherwise, too. As in, it's easy to chain as many as you want, and alter the parameters for each, too.
Code: Select all
echo "Cowception!" | cowsay | cowsay -n | cowsay -n | cowsay -n -f gnu
______________________________________
/ __________________________________ \
| / ______________________________ \ |
| | / _____________ \ | |
| | | < Cowception! > | | |
| | | ------------- | | |
| | | \ ^__^ | | |
| | | \ (oo)\_______ | | |
| | | (__)\ )\/\ | | |
| | | ||----w | | | |
| | \ || || / | |
| | ------------------------------ | |
| | \ ^__^ | |
| | \ (oo)\_______ | |
| | (__)\ )\/\ | |
| | ||----w | | |
| \ || || / |
| ---------------------------------- |
| \ ^__^ |
| \ (oo)\_______ |
| (__)\ )\/\ |
| ||----w | |
\ || || /
--------------------------------------
\ ,-----._
. \ . ,' `-.__,------._
// \ __\\' `-.
(( _____-'___)) |
`:='/ (alf_/ |
`.=| |=' |
|) O | \
| | /\ \
| / . / \ \
| .-..__ ___ .--' \ |\ \ |
|o o | ``--.___. / `-' \ \\ \ |
`--'' ' .' / / | | | | \
| | / / | | | mmm
| || | | /| |
( .' \ \ || | |
| | \ \ // / /
| | \ \ || |_|
/ | |_/ /_|
/__/
operadude
Posts: 1074 Joined: Tue Nov 05, 2019 12:08 am
#19
Post
by operadude » Wed Jun 25, 2025 12:05 pm
Nokkaelaein wrote: Wed Jun 25, 2025 11:46 am
operadude wrote: Wed Jun 25, 2025 11:42 am
I still have a vague recollection of adding to either the cow itself, or the messages, on a new line of the Terminal...
Anything goes that you can do with stdin otherwise, too. As in, it's easy to chain as many as you want, and alter the parameters for each, too.
Code: Select all
echo "Cowception!" | cowsay | cowsay -n | cowsay -n | cowsay -n -f gnu
______________________________________
/ __________________________________ \
| / ______________________________ \ |
| | / _____________ \ | |
| | | < Cowception! > | | |
| | | ------------- | | |
| | | \ ^__^ | | |
| | | \ (oo)\_______ | | |
| | | (__)\ )\/\ | | |
| | | ||----w | | | |
| | \ || || / | |
| | ------------------------------ | |
| | \ ^__^ | |
| | \ (oo)\_______ | |
| | (__)\ )\/\ | |
| | ||----w | | |
| \ || || / |
| ---------------------------------- |
| \ ^__^ |
| \ (oo)\_______ |
| (__)\ )\/\ |
| ||----w | |
\ || || /
--------------------------------------
\ ,-----._
. \ . ,' `-.__,------._
// \ __\\' `-.
(( _____-'___)) |
`:='/ (alf_/ |
`.=| |=' |
|) O | \
| | /\ \
| / . / \ \
| .-..__ ___ .--' \ |\ \ |
|o o | ``--.___. / `-' \ \\ \ |
`--'' ' .' / / | | | | \
| | / / | | | mmm
| || | | /| |
( .' \ \ || | |
| | \ \ // / /
| | \ \ || |_|
/ | |_/ /_|
/__/
Still having trouble getting each cow to say something...
Code: Select all
$ cowsay Holy Cow! | cowsay Did He say \"Holy Cow\"? | cowsay -n | cowsay -b -n | cowsay -p -n | cowsay -s -n | cowsay -n -f dragon
______________________________________________
/ __________________________________________ \
| / ______________________________________ \ |
| | / __________________________________ \ | |
| | | / ______________________________ \ | | |
| | | | / ________________________ \ | | | |
| | | | | < Did He say "Holy Cow"? > | | | | |
| | | | | ------------------------ | | | | |
| | | | | \ ^__^ | | | | |
| | | | | \ (oo)\_______ | | | | |
| | | | | (__)\ )\/\ | | | | |
| | | | | ||----w | | | | | |
| | | | \ || || / | | | |
| | | | ------------------------------ | | | |
| | | | \ ^__^ | | | |
| | | | \ (oo)\_______ | | | |
| | | | (__)\ )\/\ | | | |
| | | | ||----w | | | | |
| | | \ || || / | | |
| | | ---------------------------------- | | |
| | | \ ^__^ | | |
| | | \ (==)\_______ | | |
| | | (__)\ )\/\ | | |
| | | ||----w | | | |
| | \ || || / | |
| | -------------------------------------- | |
| | \ ^__^ | |
| | \ (@@)\_______ | |
| | (__)\ )\/\ | |
| | ||----w | | |
| \ || || / |
| ------------------------------------------ |
| \ ^__^ |
| \ (**)\_______ |
| (__)\ )\/\ |
| U ||----w | |
\ || || /
----------------------------------------------
\ / \ //\
\ |\___/| / \// \\
/0 0 \__ / // | \ \
/ / \/_/ // | \ \
@_^_@'/ \/_ // | \ \
//_^_/ \/_ // | \ \
( //) | \/// | \ \
( / /) _|_ / ) // | \ _\
( // /) '/,_ _ _/ ( ; -. | _ _\.-~ .-~~~^-.
(( / / )) ,-{ _ `-.|.-~-. .~ `.
(( // / )) '/\ / ~-. _ .-~ .-~^-. \
(( /// )) `. { } / \ \
(( / )) .----~-.\ \-' .~ \ `. \^-.
///.----..> \ _ -~ `. ^-` ^-_
///-._ _ _ _ _ _ _}^ - - - - ~ ~-- ,.-~
/.-~
operadude
Posts: 1074 Joined: Tue Nov 05, 2019 12:08 am
#20
Post
by operadude » Wed Jun 25, 2025 1:33 pm
Try this:
Code: Select all
cowsayN() {
local n=$1
shift
if ((n>1)); then
cowsay -n | cowsayN $((n-1))
else
cowsay -n
fi
}
echo -w 40 'I am thinking of a cow that is thinking of a cow...' | cowsayN 10
Result:
Code: Select all
_______________________________________________________________________________________________
/ ___________________________________________________________________________________________ \
| / _______________________________________________________________________________________ \ |
| | / ___________________________________________________________________________________ \ | |
| | | / _______________________________________________________________________________ \ | | |
| | | | / ___________________________________________________________________________ \ | | | |
| | | | | / _______________________________________________________________________ \ | | | | |
| | | | | | / ___________________________________________________________________ \ | | | | | |
| | | | | | | / _______________________________________________________________ \ | | | | | | |
| | | | | | | | / ___________________________________________________________ \ | | | | | | | |
| | | | | | | | | < -w 40 I am thinking of a cow that is thinking of a cow... > | | | | | | | | |
| | | | | | | | | ----------------------------------------------------------- | | | | | | | | |
| | | | | | | | | \ ^__^ | | | | | | | | |
| | | | | | | | | \ (oo)\_______ | | | | | | | | |
| | | | | | | | | (__)\ )\/\ | | | | | | | | |
| | | | | | | | | ||----w | | | | | | | | | |
| | | | | | | | \ || || / | | | | | | | |
| | | | | | | | --------------------------------------------------------------- | | | | | | | |
| | | | | | | | \ ^__^ | | | | | | | |
| | | | | | | | \ (oo)\_______ | | | | | | | |
| | | | | | | | (__)\ )\/\ | | | | | | | |
| | | | | | | | ||----w | | | | | | | | |
| | | | | | | \ || || / | | | | | | |
| | | | | | | ------------------------------------------------------------------- | | | | | | |
| | | | | | | \ ^__^ | | | | | | |
| | | | | | | \ (oo)\_______ | | | | | | |
| | | | | | | (__)\ )\/\ | | | | | | |
| | | | | | | ||----w | | | | | | | |
| | | | | | \ || || / | | | | | |
| | | | | | ----------------------------------------------------------------------- | | | | | |
| | | | | | \ ^__^ | | | | | |
| | | | | | \ (oo)\_______ | | | | | |
| | | | | | (__)\ )\/\ | | | | | |
| | | | | | ||----w | | | | | | |
| | | | | \ || || / | | | | |
| | | | | --------------------------------------------------------------------------- | | | | |
| | | | | \ ^__^ | | | | |
| | | | | \ (oo)\_______ | | | | |
| | | | | (__)\ )\/\ | | | | |
| | | | | ||----w | | | | | |
| | | | \ || || / | | | |
| | | | ------------------------------------------------------------------------------- | | | |
| | | | \ ^__^ | | | |
| | | | \ (oo)\_______ | | | |
| | | | (__)\ )\/\ | | | |
| | | | ||----w | | | | |
| | | \ || || / | | |
| | | ----------------------------------------------------------------------------------- | | |
| | | \ ^__^ | | |
| | | \ (oo)\_______ | | |
| | | (__)\ )\/\ | | |
| | | ||----w | | | |
| | \ || || / | |
| | --------------------------------------------------------------------------------------- | |
| | \ ^__^ | |
| | \ (oo)\_______ | |
| | (__)\ )\/\ | |
| | ||----w | | |
| \ || || / |
| ------------------------------------------------------------------------------------------- |
| \ ^__^ |
| \ (oo)\_______ |
| (__)\ )\/\ |
| ||----w | |
\ || || /
-----------------------------------------------------------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
How can I get each cow to speak a different message?