Question: Create a bash script called searchprefix.sh which takes two arguments, a string and a file ( in that order ) . The output should be

Create a bash script called searchprefix.sh which takes two arguments, a string and a file (in that order).
The output should be each line which matches the string from the beginning of the line.
For example, given a string "ANA" the line starting with "ANABEL" will be printed, but the line starting with "SUSANA" will not.

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 Programming Questions!