# The input file is already there. the file is too long, don't have to send it. using virtualbox ubuntu We

###### 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

$Something that might be used below$

[email protected]:/Documents/Implementation/Teaching/SF/files ./q3 Enter your commande snap thanos Enter your commande snap -ironman Enter your commande snap -holk Enter your commande: exit [email protected]~/Documents/Implementation/Teaching/SF/files
Write contents into a text file 1include 2include 3 using namespace std 5 int mainO 6 ofstream myfile; 7 myfile.open ("example.txt", ios::app); 8 myfile

#### Similar Solved Questions

##### 24. A radioisotope of argon, 35 Ar, lies below the "band of stability: (n/p ratio too...
24. A radioisotope of argon, 35 Ar, lies below the "band of stability: (n/p ratio too low). One would predict that it decays via (a) positron emission (b) beta emission (c) neutron emission (d) alpha emission (e) fission...
##### (16 points) Consider the equation for the charge on a capacitor in an LRC circuit +...
(16 points) Consider the equation for the charge on a capacitor in an LRC circuit + 9 + 169 = E which is linear with constant coefficients. First we will work on solving the corresponding homogeneous equation. Divide through the equation by the coefficient on and find the auxiliary equation (using m...
##### Why is calcium oxide basic in nature?
Why is calcium oxide basic in nature?...
##### If 17/3 L of a gas at room temperature exerts a pressure of 24 kPa on its container, what pressure will the gas exert if the container's volume changes to 19/4 L?
If 17/3 L of a gas at room temperature exerts a pressure of 24 kPa on its container, what pressure will the gas exert if the container's volume changes to 19/4 L?...
##### Real Analysis question, give clear writing please Let h(x) be the function on (0, 1) defined...
Real Analysis question, give clear writing please Let h(x) be the function on (0, 1) defined by ſi x <1 h(x) = 2 X=1 (a) For any P, what is the value of L(f,P)? (b) Can you find a P such that U(f,P) is within 1/10 of L(f,P)? (c) Show that h is integrable....
##### Briefly describe the evolutionary history and tree of the hominids. Show the relationship to living apes...
Briefly describe the evolutionary history and tree of the hominids. Show the relationship to living apes like chimps, the main groups and when they branched off, the origin of bipedalis., tool use, and migrations out of Africa, Include chimps, Ardi, Tomo floriensis and modern human( Homo sapiens)...
##### Need help 8) (18 points) A student wonders if tall women tend to date taller men...
need help 8) (18 points) A student wonders if tall women tend to date taller men than do short women. She randomly selected couples from her school. Here are the data (heights in inches): (remember to do ALL parts) Women Men 62 71 68 67 67 71 69 70 71 68 71 69 a. Do these data provide convincing ...
##### A particle leaves the origin with a speed of 3.5 106 m/s at 28 degrees to...
A particle leaves the origin with a speed of 3.5 106 m/s at 28 degrees to the positive x axis. It moves in a uniform electric field directed along positive y axis. Find Ey such that the particle will cross the x axis at x = 1.5 cm if the particle is an electron...
##### How do you simplify 2(4 + t)?
How do you simplify 2(4 + t)?...
##### Could you please provide a clear and accurate worked solution for the following problem. I will...
Could you please provide a clear and accurate worked solution for the following problem. I will leave feedback that matches the accuracy and effort of your solution. Please make any formulas used clear. Thank you. There is an object with some forces acting on it. Through its centre of gravity at (0...
##### 4. A bullet is fired vertically upward with an initial velocity of 260m/s. a) How high...
4. A bullet is fired vertically upward with an initial velocity of 260m/s. a) How high does it go? b) How long does it take to reach maximum height? c) How long is it the air ? ( or time to hit the ground) Farh 5. The volume of a cylinder is: Vanrh If V=2,500 m and h = 17 m find the value ofr...
##### JAVA: Excerpt B.A: Complete the implementation of the following method. The purpose of this method is...
JAVA: Excerpt B.A: Complete the implementation of the following method. The purpose of this method is to return true if and only if all the elements in the array are x. In other words, all elements in the array are the value x (replace -a- with right answer). public static -a- allSame(int[] nums, in...
##### A stock’s return has the distribution below. Calculate the stock’s Sharpe ratio, expressed to three decimals....
A stock’s return has the distribution below. Calculate the stock’s Sharpe ratio, expressed to three decimals. Assume the risk-free rate is 3%. (Note: it is easier to use your values from above and plug & chug.) Demand for Products Probability of Demand Occurring Rate of Retur...