Question: I am trying to create an script that will enable me to Grep a command to find a string of command in a txt file,

I am trying to create an script that will enable me to Grep a command to find a string of command in a txt file, then write a script to count the lines in each file.I am trying to create an script that will enable me to

on the left side you will see a a list of names that I m trying to grep from and on the right hand side is my script that is providing me with errors.

an detailed explaination on where I went wrong would really help.

open Save test string.txt mbarrett@localhost:-/Desktop Help orange.txt ajay arun sam john james guru File Edit View #1 /bin/bash grep $1 $2 rc=$? Search Terminal then echo "specified string $1 not present in $2" else echo "specified string $1 is present in the file $2" # number of lines of in a file Wc $2| awk 'print $1) find string.sh" 12L, 2190 11,29 All open Save test string.txt mbarrett@localhost:-/Desktop Help orange.txt ajay arun sam john james guru File Edit View #1 /bin/bash grep $1 $2 rc=$? Search Terminal then echo "specified string $1 not present in $2" else echo "specified string $1 is present in the file $2" # number of lines of in a file Wc $2| awk 'print $1) find string.sh" 12L, 2190 11,29 All

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!