Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.image text in transcribed

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

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

b. Demand decreases and supply is constant.

Answered: 1 week ago