For your case, you have one line of leading and one line of trailing context you care about, so grep -C1 Toronto input
should do it.
More Related Contents:
- How do I recursively grep all directories and subdirectories?
- How to concatenate multiple lines of output to one line?
- Finding contents of one file in another file
- grep without showing path/file:line
- Using grep and sed to find and replace a string
- grep lines that contain 1 character followed by another character
- How do I find all files containing specific text on Linux?
- When should I wrap quotes around a shell variable?
- How to cat a file containing code?
- Is it possible to use “/” in a filename?
- What does $@ mean in a shell script?
- Forcing bash to expand variables in a string loaded from a file
- How to convert DOS/Windows newline (CRLF) to Unix newline (LF)
- How to instruct cron to execute a job every second week?
- How do I use the lines of a file as arguments of a command?
- How can I programmatically create a new cron job?
- Managing log files created by cron jobs
- GROUP BY/SUM from shell
- List files recursively in Linux CLI with path relative to the current directory
- What is the difference between “source script.sh” and “./script.sh”?
- How to print third column to last column?
- How to search and replace using grep
- Monitor Directory for Changes
- How to search contents of multiple pdf files?
- don’t fail jenkins build if execute shell fails
- How do you search for files containing DOS line endings (CRLF) with grep on Linux?
- Syntax error near unexpected token ‘then’
- Why doesn’t “sort file1 > file1” work?
- Bash script to remove ‘x’ amount of characters the end of multiple filenames in a directory?
- How pthread_mutex_lock is implemented