In Linux, call the grep command to search for word 'hello' and read from the file test.txt, instad of from stdin (i.e. use file redirection syntax).
Answer
grep -w 'hello' < test.txt
^^ note the use of the < char to read input from a file instead of from stdin (which grep reads from when no file is supplied).
Question
In Linux, call the grep command to search for word 'hello' and read from the file test.txt, instad of from stdin (i.e. use file redirection syntax).
Answer
?
Question
In Linux, call the grep command to search for word 'hello' and read from the file test.txt, instad of from stdin (i.e. use file redirection syntax).
Answer
grep -w 'hello' < test.txt
^^ note the use of the < char to read input from a file instead of from stdin (which grep reads from when no file is supplied).
If you want to change selection, open document below and click on "Move attachment"
8. Streams and sed -- The Stream Editor i | grep n | grep u | grep x The < character redirects the contents of a file in place of stdin. In other words, the contents of a file replace what would normally come from a keyboard. Try <span>grep GNU < gnu_lines.txt 8.4 A Complex Piping Example In Chapter 5 we used grep on a dictionary to demonstrate regular expressions. This is how a dictionary of words can be created (your dictionary might be und
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.