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.

14 lines
430 B

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