Browse Source

grep info

master
zeus 4 years ago
parent
commit
f4a31f2d13
  1. 3
      grep/1_Displaying_info/code
  2. 1
      grep/1_Displaying_info/codeanswer
  3. 1
      grep/1_Displaying_info/codehelp
  4. 24692
      grep/1_Displaying_info/data
  5. 6
      grep/1_Displaying_info/info
  6. 9
      grep/1_Displaying_info/q-info

3
grep/1_Displaying_info/code

@ -0,0 +1,3 @@
grep -c "Jordan" $LLO_DATAFILE
echo " Prefix each line of output with the 1-based line number within its input file."
grep -n "Jordan" $LLO_DATAFILE

1
grep/1_Displaying_info/codeanswer

@ -0,0 +1 @@
grep -Hns "Jordan" $LLO_DATAFILE

1
grep/1_Displaying_info/codehelp

@ -0,0 +1 @@
grep -Hns "Jordan" $LLO_DATAFILE | head -1

24692
grep/1_Displaying_info/data

File diff suppressed because it is too large

6
grep/1_Displaying_info/info

@ -0,0 +1,6 @@
- Displaying the count of number of matches
We can find the number of lines that matches the given string/pattern AND
- Prefix each line of output with the 1-based line number within its input file.

9
grep/1_Displaying_info/q-info

@ -0,0 +1,9 @@
Try to run
[source,sh]
----
grep -Hns "jordan" $LLO_DATAFILE
----
and see the Results!
Loading…
Cancel
Save