you are viewing a single comment's thread.

view the rest of the comments →

[–]AFutureConcern 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (0 children)

Unzip the archive somewhere. If you're on Linux or Mac OS, then open a terminal window and change directory to that location. If you're on windows, then open a PowerShell window.

A full command-line tutorial is outside the scope of a saidit comment, but man grep on Linux or Mac OS should give you a help file, and help sls will show help on Windows. You can search for "grep tutorial" or "powershell select-string" to get help online.

Here are a couple of motivational examples:


Search for lines containing "AFutureConcern" in all files below the current directory, with 2 lines before and 3 after:

Linux, Mac OS

grep -r AFutureConcern -B 2 -A 3

Windows

ls * -r | sls AFutureConcern -CaseSensitive -Context 2,3

List the names of files containing either the word "replacement" or "globohomo", ignoring case:

Linux, Mac OS

grep --recursive --ignore-case --files-with-matches --extended-regexp 'replacement|globohomo'
# or simply
grep -r -i -l -E 'replacement|globohomo'

Windows

ls * -r | sls 'replacement|globohomo' | select -u -exp path