I have a file like this:
cat file
name = server
jobname = 1010
snapshot_name = funky_Win2k12_20140213210409
I'm trying to use grep to isolate that first line (name = server), but
grep -f "name = " file
as well as
fgrep "name = " file
returns all 3 lines. How do I return results LITERALLY as I'm quoting them without it including matches that have preceding text?
---------- Post updated at 03:17 PM ---------- Previous update was at 03:11 PM ----------
*Edit - Might've answered my own question....seems that '^' works.
i.e. -
grep "^name = " file