How to read from the console? - Linux
I have a scenario where I am printing something from an application to the linux CLI. I have another application that will be reading that 开发者_StackOverflowvalue from the command line. Is there a linux command that I can execute that will read a line from the console? I am using a java application to write to the console and a asterisk box reading from the console. Thanks
Use piping, e.g:
cat foo.txt | wc -l
This allows you to redirect one process output to another process input.
精彩评论