has answered your question.
I give you some explanation here.
grep -v "pattern" fileName
prints lines that do not caontain the "pattern". If the "pattern" is not found at all then all the lines are printed.
Remove the -v
option and it will print only those lines that contain at least one match of the "pattern".
grep -v "shozbot" game
will print any line that does not contain "shozbot".
Next, we pipe this output to the sort
command which displays the sorted lines:
grep -v "shozbot" game | sort
Finally, we redirect the sorted output to a named file:
grep -v "shozbot" game | sort > squiggy
Check it out!