Hi just wondering how to get cowsay
to read off one word at a time from a text file. I'm at ground zero right now, using putty and really need help.
Hi just wondering how to get cowsay
to read off one word at a time from a text file. I'm at ground zero right now, using putty and really need help.
This seems to be a rare case where word splitting is actually desirable:
(the
sleep
command is optional). Or there's alwaysxargs
:Here's something I came up with really quickly. I put one line in a test file then fed it to cowsay.
I set it to read each line, then do a
for loop
of each line to read each word. Example below:Each individual line of that command would look like:
Hope this helps!
Python one-liner:
Sample run: