Question: First script (bash) Write a script named makedoto.sh that accepts as arguments a few .c filenames and for each filename prints on the terminal the

First script (bash)

Write a script named makedoto.sh that accepts as arguments a few .c filenames and for each filename prints on the terminal the same filenames but with the .c ending replaced by a .o ending. You do this by having a for loop that iterates over all the script arguments (aka positional parameters) and assigns to a shell variable the filename with the .c ending stripped and then prints the stripped name with a .o attached to it. You can use either basename or the bash the bash ${ mechanism to remove a suffix pattern.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!