14/05/2020 2:34 pm
any help? thanks
15/05/2020 2:56 pm
Hi @Blastbeak! Here are some hints.
1. grep is used for finding lines which match a pattern. If you want to find lines which don't match a pattern, you can use the -v option. The syntax is like this:
grep targetword file_to_search_in -v
2. sort is used to sort lines. In order to sort in reverse order, you can use the -r option. The syntax is like this:
sort -r my_file_to_sort
3. In this exercise, you want to sort the output from the grep, so you need to pipe (|) the output to sort, which looks something like this:
grep something | sort -r
4. To write the output to a file, you can use >. The syntax is like this:
"some text" > my_output_file
Hopefully the above is sufficient to help you solve this. Good luck!
15/05/2020 3:48 pm
We have reviewed the question and amended it to a multiple choice question as it is too open-ended for a fill in the blank question.