Find a pattern in a file at a particular location


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Find a pattern in a file at a particular location
# 1  
Old 02-22-2009
Find a pattern in a file at a particular location

Hi all,

I have a question on how to search for a pattern in a file and return a value if it is present at that particular location.

How to read each line and each character for the pattern in the file of any format.

Eg for the file format:

attached the file
# 2  
Old 02-22-2009
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies

2. Shell Programming and Scripting

Find and Copy file of specific location

Dear All, I need to transfer all files present in one location to another but those files should be of specific extension like. Find and copy all files of extension .xls, .pdf, .txt from location usr/tmp to location /per/Treat (6 Replies)
Discussion started by: yadavricky
6 Replies

3. Shell Programming and Scripting

How to find a file with a specific pattern for current sysdate & upon find email the details?

I need assistance with following requirement, I am new to Unix. I want to do the following task but stuck with file creation date(sysdate) Following is the requirement I need to create a script that will read the abc/xyz/klm folder and look for *.err files for that day’s date and then send an... (4 Replies)
Discussion started by: PreetArul
4 Replies

4. Shell Programming and Scripting

How to find a word and move it a specific location in xml file using perl?

Hi friends, I have one XML file having below structure :- INput XML file :- <?xml version="1.0" encoding="UTF-8"?> <START> <A=value1> <attr name1="a1"> </A> <B=value2> <attr name2="b1"> <attr name3="c1"> </B> </START> output xml file should be === (3 Replies)
Discussion started by: harpal singh
3 Replies

5. UNIX for Dummies Questions & Answers

Find the location of particular file and directory

hi all, i am new to UNIX environment. i have a file and directory with same name, i don't know the location I want to find location of that file and directory. please suggest a solution. (5 Replies)
Discussion started by: mahesh1987
5 Replies

6. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies

7. Shell Programming and Scripting

Searching the file of below pattern through perl script from different location

Hi All, I am creating a small per script but I am getting the error "Unable to open file because No such file or directory".My code is below.I am trying to go into the below location so using chdir and then seraching the log files of below pattern. #!/usr/bin/perl -w chdir... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

8. UNIX for Dummies Questions & Answers

How to find a file if we dont know exact location of file ?

Hi I want know "How to find a file if we dont know exact location of file ?" Thanks, Tushar Joshi:) (9 Replies)
Discussion started by: tusharjoshi
9 Replies

9. Shell Programming and Scripting

File created in a different location instead of desired location on using crontab

Hi, I am logging to a linux server through a user "user1" in /home directory. There is a script in a directory in 'root' for which all permissions are available including the directory. This script when executed creates a file in the directory. When the script is added to crontab, on... (1 Reply)
Discussion started by: archana.n
1 Replies
Login or Register to Ask a Question