Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your task is to create a python script (single .py file) which will read the file fileSpec searching for the string from and, when found,

Your task is to create a python script (single .py file) which will read the file "fileSpec" searching for the string "from" and, when found, replacing it with "to".

The invocation of the script must be as follows:

python modify.py fileSpec from to

where, modify.py is the name of your script

fileSpec is the name of the file to be modified (smb.txt)

from is the text to be searched for (be sure to enclose any white space in quotes.

to is the text the searched text is to be replaced with.

sample python modify.py smb.txt password sync = yes password sync = no

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

4. Did you rethink your decision?

Answered: 1 week ago

Question

3. Did you seek anyones advice?

Answered: 1 week ago

Question

7. What traps should she avoid?

Answered: 1 week ago