开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜