I have a program which sends text to an LED sign.
prismcom.exe
To use the program to send "Hello":
prismcom.exe usb Hello
Now, I wish to, for example use a command program called Temperature.
temperature
Let's say the program gives your computer's temperature.
Your computer is 100 degrees Fahrenheit.
Now, I wish to write the output of temperature to prismcom.exe:
temperature | prismcom.exe usb
This does not seem to work.
Yes, I've looked for a solution to this for more than twenty minutes. In all cases, they are either kludges/hacks or a solution for something besides the Windows command line.
I would appreciate direction as to how I would pipe the output from temperature to prismcom.
Thanks!
Edit: Prismcom has two arguments. The first will always be 'usb'. Anything that comes after that will be displayed on the sign.
A pipe is a form of redirection (transfer of standard output to some other destination) that is used in Linux and other Unix-like operating systems to send the output of one command/program/process to another command/program/process for further processing.
Summary: Pipes '|' send the output of one command as input of another command.
On a command line, redirection is the process of using the input/output of a file or command to use it as an input for another file. It is similar but different from pipes, as it allows reading/writing from files instead of only commands. Redirection can be done by using the operators > and >> .
The pipe character | is used to connect the output from one command to the input of another. > is used to redirect standard output to a file. Try it in the shell-lesson-data/exercise-data/proteins directory!
Try this. Copy this into a batch file - such as send.bat - and then simply run send.bat
to send the message from the temperature program to the prismcom program.
temperature.exe > msg.txt set /p msg= < msg.txt prismcom.exe usb "%msg%"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With