You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
431 B

4 years ago
echo "Inverting the pattern match"
4 years ago
grep -v "Jordan" $LLO_DATAFILE | head -5
4 years ago
4 years ago
echo "Matching the lines that start with a string"
grep -n "^Mi" $LLO_DATAFILE | tail -5
4 years ago
echo "Matching the lines that end with a string"
grep -n "15$" $LLO_DATAFILE | tail -5
4 years ago
echo "Checking for the whole words in a file"
grep -w "Jordan" $LLO_DATAFILE | tail -5
4 years ago
4 years ago
echo "Displaying only the matched pattern"
grep -o "Jordan" $LLO_DATAFILE | tail -5