Shell script to find a particular pattern from the file, Programming Languages

W.A.S.S to find a particular pattern from the file.

 echo -e "Enter the pattern : \c"

read ptrn

echo -e "Enter the file name : \c"

read fname

grep -E $ptrn $fname

 

Output

 

     sh findp.sh

 Enter the pattern : drw*

Enter the file name : temp3.txt

drwx------ 3 root root 1024 May 12 2005 Desktop

drwx------ 2 root root 1024 Sep 19 00:06 mail

           drwxr-xr-x 2 root root 1024 Nov 23 23:24 narendra

Posted Date: 9/26/2012 8:18:10 AM | Location : United States







Related Discussions:- Shell script to find a particular pattern from the file, Assignment Help, Ask Question on Shell script to find a particular pattern from the file, Get Answer, Expert's Help, Shell script to find a particular pattern from the file Discussions

Write discussion on Shell script to find a particular pattern from the file
Your posts are moderated
Related Questions
basic steps involved in spreadsheet developement

I can attach or send the assignment instructions, but they''re rather long. 90% of the code is already written and given to us. The assignment is primarily rewriting and rearrangin

Question: (a) In JavaScript, the Window Object is commonly used to request information from a user or to output some results. Give three ways how to create instances of the

I need to finish my game project within two weeks using XNA. Would you guys can help me to finish it? Thank you

Write a Program to illustrate the call by value? #include . int compute_sum(int m); int main( void) { int n=3, sum; printf("%d\n",n); /*3 is printed */ sum=compute_sum(n

Produce a hierarchy chart, a structured flowchart, and a Pascal program (with appropriate comments) to generate the Sales Commission Report shown below. The commission for each sal


What are Attributes in HTML langauge? A few tags have attributes. An attribute is a name, followed through an = sign, followed by the value. For instance, to make a centered H1

Problem 1 Define the architecture of UNIX operating system with appropriate diagram Problem 2 Define the term inter-process communication. What are several approaches t

Triple Eigenvalue with 1 Eigenvector The eigenvalue/vector pair in this case are l and  ?h , . Since the eigenvalue is real we know as the first solution we require is, e l