I have a program which sends text to an LED sign.
prismcom.exe
To use the program to send \"Hello\":
prismcom.exe usb Hello
Not sure if you are coding these programs, but this is a simple example of how you'd do it.
program1.c
#include
int main (int argc, char * argv[] ) {
printf("%s", argv[1]);
return 0;
}
rgx.cpp
#include
#include
#include
using namespace std;
int main (int argc, char * argv[] ) {
char input[200];
fgets(input,200,stdin);
string s(input)
smatch m;
string reg_exp(argv[1]);
regex e(reg_exp);
while (regex_search (s,m,e)) {
for (auto x:m) cout << x << " ";
cout << endl;
s = m.suffix().str();
}
return 0;
}
Compile both then run program1.exe "this subject has a submarine as a subsequence" | rgx.exe "\b(sub)([^ ]*)"
The | operator simply redirects the output of program1's printf operation from the stdout stream to the stdin stream whereby it's sitting there waiting for rgx.exe to pick up.