Question 3
Write a shell script that allows a user to write a nursery rhyme directly from the CLI and have the rhyme stored in a text file.
Your script should then replace all vowels in the rhyme with the letter “t”
Your script should also count the number of lines in the rhyme
Your script should make a copy of the text file and append all the characters of the first file into the second file into it.
Then delete all the contents of the first file.
B) Give four working examples of how to use grep in shell scripting,
C) list all hidden files in the present working directory showing all hidden files and in the long format
D) Explain the difference between ls -l > mylisting.txt and ls -l >> mylisting.txt [4 marks]
Comments
Leave a comment