Why can’t grep find negative numbers?
( go to the article → https://www.johndcook.com/blog/2019/12/07/grep-negative-numbers/ )
Suppose you’re looking for instances of -42 in a file foo.txt. The command grep -42 foo.txt won’t work. Instead you’ll get a warning message like the following. Usage: grep [OPTION]... PATTERN [FILE]... Try 'grep --help' for more information. Putting single or double quotes around -42 won’t help. The problem is that grep interprets 42 as […]
Dec. 7, 2019, 12:35 p.m.
You may be interested in:
Newest in: Computing
Newest in: Regular Expressions