'How to add a sentence before an output in Linux shell?

Hi there so I am wondering how can I add a short sentence/txt before an output?

command: grep -o 'DONE' student_accomodation_records.txt | wc -l
output: 2

I am simply calculating the amount of times a word appears in a text file.

how do I say "the amount of times this appears: '2' in the output?



Solution 1:[1]

Suggesting:

echo "the amount of times this appears: $(grep -c 'DONE' student_accomodation_records.txt)"

Explanation

-c Options prints out count of grep matches.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dudi Boy