Search content and print its next value


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Search content and print its next value
# 8  
Old 06-03-2014
We understand your requirement, but we are interested to see your efforts, let us know what you have tried with awk and grep.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print content between two html tags

Hi Expert, Is there any other way to print and write to a same filename the content between two html tags? Here the sample: cat file.html <div id="outline"> hello world<br> </div> <div id="container_faq"> test1<br> </div> <div class="widget_quick"> thead test<br> </div> ... (3 Replies)
Discussion started by: lxdorney
3 Replies

2. UNIX for Dummies Questions & Answers

Search file and print everything except multiple search terms

I'm trying to find a way to search a range of similar words in a file. I tried using sed but can't get it right:sed 's/\(ca01\)*//'It only removes "ca01" but leaves the rest of the word. I still want the rest of the information on the lines just not these specific words listed below. Any... (3 Replies)
Discussion started by: seekryts15
3 Replies

3. Shell Programming and Scripting

Perl - use search keywords from array and search a file and print 3rd field when matched

Hi , I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code. my $current_value=12345; my @users=("bob","ben","tom","harry"); open DBLIST,"<","/var/tmp/DBinfo"; my @input = <DBLIST>; foreach (@users) { my... (11 Replies)
Discussion started by: chidori
11 Replies

4. Shell Programming and Scripting

Need to print body of content using mailx

Hi, I'm a perl developer. I need to attach a file from my perl cgi script and send mail to our users whoever using our website. I have used mailx command to attach a file.. it is working fine for me. The problem I'm facing is I'm not getting body of the mail. I have a function called... (0 Replies)
Discussion started by: bheeshmaraja
0 Replies

5. Shell Programming and Scripting

Print @array content to a file

Hi, as the title, I have an array @f_lines with gene information in it. How can I put the content of @f_lines into a file so that I can read it? I tried this: open(OUTPUT, "file"); # put gene information in this file; @f_lines = ("gene1", "gene2", "gene3"...); # gene information; print... (3 Replies)
Discussion started by: lyni2ULF
3 Replies

6. Shell Programming and Scripting

search and replace the content

Hi All,sorry for inconvience....please find the attachement for my question i am unable to paste the question here....please help me in slving thisthanksk.k (4 Replies)
Discussion started by: G.K.K
4 Replies

7. Linux

How to search file content

Hi folks, What will be an easy and effective way searching file content? E.G I need to find a WORD or a PHRASE on a file? TIA B.R. satimis (4 Replies)
Discussion started by: satimis
4 Replies

8. UNIX for Dummies Questions & Answers

Search File content.

Hi, I have a problem when searching a file, the file containt with the following: 95671660:Jones:Sarah:45:sales manager 93272658:Smith:John:43:technical manager 98781987:Williams:Nick:35:computer officer 99893878:Brown:Sarah:12:electrician 95673456:Couch:David:26:chef... (3 Replies)
Discussion started by: elenatec
3 Replies

9. UNIX for Advanced & Expert Users

Search files with specfic extention and later search content

Hi, I would appriciate if somebody can help me figure out how to search for all the *.xml file under a specific directory and subdirectroies (/home/username) and later search of content "<start>" inside the xml file returned by search. -Lovin.V (2 Replies)
Discussion started by: lovi_v
2 Replies

10. UNIX for Dummies Questions & Answers

How to print content on the screen

I have the following questions regrading Unix commands. 1. Could you provide the commands how to print the content of .profile and .shrc files on the screen using more and piple command? or a better way? 2. How can i use the head and tail to display lines from 25 through 75... or a better... (4 Replies)
Discussion started by: aadba
4 Replies
Login or Register to Ask a Question
ZGREP(1)                                                      General Commands Manual                                                     ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)