开发者

How to read from the console? - Linux

开发者 https://www.devze.com 2023-03-29 15:39 出处:网络
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 lin

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

精彩评论

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