Question: Write a program that takes two command line arguments. The first one is the name of a file. The second one is a word.
Write a program that takes two command line arguments. The first one is the name of a file. The second one is a word. Your program should search for the word in the file specified. Here is an example: Suppose I have "input.txt" in my current working directory. The content of this file is: Hi everyone. This is a test file that I created for assignment 2. This is the beginning of the second line in the file. I am getting tired of typing!! This should be the last line. Some sample input and output of this program: 1) Arguments: input.txt assignment Output of the program: Line: 1, character: 53 2) Arguments: input.txt second Output of the program:
Step by Step Solution
3.46 Rating (159 Votes )
There are 3 Steps involved in it
Below is a simple Python program that takes two command line arguments searches for the specified wo... View full answer
Get step-by-step solutions from verified subject matter experts
