What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-28 11:46:02
tail grep
tail -f file | grep --line-buffered my_pattern Add solution -
Shell/Bash 2021-08-28 10:30:01
netstat listening port 8080 mac
lsof -nP -iTCP:$PORT | grep LISTEN Add solution -
Shell/Bash 2021-08-28 08:12:01
ubuntu find file with text
grep -r someWordToSearchHere * Add solution -
Shell/Bash 2021-08-28 06:12:02
bash return only first line that contains match
# Basic syntax: grep -m 1 "pattern" input_file.txt # Where -m is the maximum number of matching lines to return, i.e. stop # reading the file after m matches # Note, this is more efficient than piping to head because there you # always read the ... Add solution -