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
Genetic Diseases Problem Description Many human diseases could be controlled by the knowledge of the gene's structure and pattern. The human gene could be represented by fou

create a small database for a company, require at least 4 tables. also, have 4 business report, oracle built-in function, 5 string, 5 number or math functions, 5 date and time func

Explain the While Statement - Computer Programming? A 'while statement' is an entry controlled loop statement. When the expression is calculated and the condition is not satisf


Redundant sequence identification: Given a set of k DNA sequences, S = { s 1, s 2, ... ,  s k } give an optimal algorithm to identify all sequences that are completely contained

using UML 1- Identify primary classes 2- Scenario description 3- Class diagrams 4- Sequence diagrams

What are the main pros and cons of assembly programming language?

I WANT TO MAKE PROJECT IN ARM LANGUAGE CAN YOU HELP ME

.NET Windows Services But Enthusiasm has an amazing record of beginning overdue but finding up easily. This is real in situation of .NET too. Enthusiasm put their best men at

The reader-writer problem can be stated as follows: A shared memory location can be concurrently read by any number of tasks, but when a task must write to the shared memory locati