Skip to main content
added 257 characters in body
Source Link
Mesut Tasci
  • 825
  • 3
  • 13
  • 17

I have a named fifo and I am writing random number to this fifo. When I write to fifo I want to find written text in numbers.txt file and write the result row to stdout.

Content of numbers.txt file is:

1 one
2 two
3 three
... and so on

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I tryam running command shown as below but this does not write anything to stdoutin first terminal:

cat <> myfifo | grep -f - numbers.txt

And I am writing to fifo in another terminal show as below:

echo 1 > myfifo

But I can't see any output in stdout in first terminal window.

I want to see 2 two in first terminal output when I execute echo 2 > myfifo in second terminal window. How to achive this?

I have a named fifo and I am writing random number to this fifo. When I write to fifo I want to find written text in numbers.txt file and write the result row to stdout.

Content of numbers.txt file is:

1 one
2 two
3 three
... and so on

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I try below but this does not write anything to stdout:

cat <> myfifo | grep -f - numbers.txt

How to achive this?

I have a named fifo and I am writing random number to this fifo. When I write to fifo I want to find written text in numbers.txt file and write the result row to stdout.

Content of numbers.txt file is:

1 one
2 two
3 three
... and so on

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I am running command shown as below in first terminal:

cat <> myfifo | grep -f - numbers.txt

And I am writing to fifo in another terminal show as below:

echo 1 > myfifo

But I can't see any output in stdout in first terminal window.

I want to see 2 two in first terminal output when I execute echo 2 > myfifo in second terminal window. How to achive this?

I have a named fifo and I am writing random number to this fifo.

When When I write to fifo I want to grep writedfind written text in numbers.txt file and write foundthe result row to stdout.

Content of numbers.txt file is:

1 one
2 two
3 three
... and so on

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I try below but this does not write anything to stdout:

cat <> myfifo | grep -f - numbers.txt

How to achive this?

I have a named fifo and I am writing random number to this fifo.

When I write to fifo I want to grep writed text in numbers.txt and write found row to stdout.

Content of numbers.txt file:

1 one
2 two
3 three
...

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I try below but this does not write anything to stdout:

cat <> myfifo | grep -f - numbers.txt

How to achive this?

I have a named fifo and I am writing random number to this fifo. When I write to fifo I want to find written text in numbers.txt file and write the result row to stdout.

Content of numbers.txt file is:

1 one
2 two
3 three
... and so on

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I try below but this does not write anything to stdout:

cat <> myfifo | grep -f - numbers.txt

How to achive this?

deleted 76 characters in body
Source Link
Mesut Tasci
  • 825
  • 3
  • 13
  • 17

I have a named fifo and I am writing random number to this fifo.

When I write to fifo I want to grep writed text in numbers.txt and write found row to stdout.

Content of numbers.txt file:

1 one
2 two
3 three
...

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I try below but this does not write anything to stdout:

cat <> myfifo | grep -f - numbers.txt

I tried use grep with --line-buffered parameter but not worked too.

How to achive this?

I have a named fifo and I am writing random number to this fifo.

When I write to fifo I want to grep writed text in numbers.txt and write found row to stdout.

Content of numbers.txt file:

1 one
2 two
3 three
...

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I try below but this does not write anything to stdout:

cat <> myfifo | grep -f - numbers.txt

I tried use grep with --line-buffered parameter but not worked too.

How to achive this?

I have a named fifo and I am writing random number to this fifo.

When I write to fifo I want to grep writed text in numbers.txt and write found row to stdout.

Content of numbers.txt file:

1 one
2 two
3 three
...

I want to search text which piped to grep in this file. For example If I write 1 to named pipe, grep should print 1 one to stdout.

I try below but this does not write anything to stdout:

cat <> myfifo | grep -f - numbers.txt

How to achive this?

Source Link
Mesut Tasci
  • 825
  • 3
  • 13
  • 17
Loading