The input file is already there. the file is too long, don't have to send it. using
Question:
The input file is already there. the file is too long, don't have to send it.
using virtualbox ubuntu
We want to create a command line terminal where user can run the snap commands with three different options: -thanos, -ironman and -holk. The terminal must keep listening to user command.
If the user type:
-
? snap -thanos: all the text line in the text file ?input.txt? that does not contain the word ?thanos? must be randomly removed. The remaining text will be save into the new file named ?thanossnap.txt?. The content in ?input.txt? keep unchanged
-
? snap -holk: all the text line in the text file ?thanossnap.txt? that does not contain the word ?thanos? will be duplicated. The new content will be save into the new file named ?holksnap.txt?
-
? snap -ironman: all the text line in the text file ?input.txt? that contains the word ?thanos? must be removed. The remaining contents must be saved in file ?ironmansnap.txt?
-
? exit: quit the programme