In awk
:
awk '$2 == "LINUX" { print $0 }' test.txt
See awk
by Example for a good intro to awk
.
In sed
:
sed -n -e '/^[0-9][0-9]* LINUX/p' test.txt
See sed
by Example for a good intro to sed
.
More Related Contents:
- Remove non-ASCII characters from CSV
- Remove multi-line comments
- Insert a line at specific line number with sed or awk
- Remove line if field is duplicate
- delete a column with awk or sed
- remove ^M characters from file using sed
- What is the difference between sed and awk? [closed]
- Convert 11/2/1998 to 110298 [duplicate]
- Some troubles with using sed and awk [closed]
- How do you delete all lines that contain no letters from the alphabet using either grep, sed, or awk? [closed]
- substitute words on a line only before first delimeter using sed or awk
- How can I replace each newline (\n) with a space using sed?
- How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?
- How to insert strings containing slashes with sed? [duplicate]
- Combining two sed commands
- How to escape single quote in sed?
- Why does my tool output overwrite itself and how do I fix it?
- sed or awk: delete n lines following a pattern
- Using sed, Insert a line above or below the pattern? [duplicate]
- Print lines in one file matching patterns in another file
- How to remove trailing whitespaces with sed?
- How to replace the nth occurrence of a string using sed
- How to show only next line after the matched one?
- Easiest way to extract the urls from an html page using sed or awk only
- How to remove double-quotes in jq output for parsing json files in bash?
- sed: Replace part of a line
- Print lines in file from the match line until end of file
- Have sed ignore non-matching lines
- Awk replace a column with its hash value
- How to delete rows from a csv file based on a list values from another file?