Sponsored Content
Top Forums Shell Programming and Scripting Want to grep for a pattern and display the content above that pattern Post 302432500 by ajayakunuri on Friday 25th of June 2010 06:48:27 AM
Old 06-25-2010
Thanks all for your replies. It is working now Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

display content between all similar tags pattern

hi, I m stuck at a point for more than 3days. My doubt is pretty simple.. I have a web page content in $content. ( got this by using LWP).. Now I want to display the content matching a pattern. I tried if($content =~ m{<div class="abc">(.*?)</div>}s){ print $1;} that will... (4 Replies)
Discussion started by: therockravi
4 Replies

2. Shell Programming and Scripting

Grep pattern from different file and display if it exists in the required file

Hi, I have two files say xxx.txt and yyy.txt. xxx.txt is with list of patterns within double quotes. Eg. "this is the line1" "this is the line2" The yyy.txt with lot of lines. eg: "This is a test message which contains rubbish information just to fill the page which is of no use. this is... (3 Replies)
Discussion started by: abinash
3 Replies

3. Shell Programming and Scripting

Grep a pattern given in one file at other file and display its corresponding contents as output.

***************************************** Right now i have this current system. I have two files say xxx.txt and yyy.txt. xxx.txt is with list of patterns within double quotes. Eg. "this is the line1" "this is the line2" The yyy.txt with lot of lines. eg: "This is a test message which... (7 Replies)
Discussion started by: abinash
7 Replies

4. Shell Programming and Scripting

Grep the word from pattern line and update in subsequent lines till next pattern line reached

Hi, I have got the below requirement. please suggest. I have a file like, Processing Item is: /data/ing/cfg2/abc.txt /data/ing/cfg3/bgc.txt Processing Item is: /data/cmd/for2/ght.txt /data/kernal/config.klgt.txt I want to process the above file to get the output file like, ... (5 Replies)
Discussion started by: rbalaj16
5 Replies

5. Shell Programming and Scripting

sed and awk usage to grep a pattern 1 and with reference to this grep a pattern 2 and pattern 3

Hi , I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows. # diff mir_lex.c.modified mir_lex.c.orig 3209c3209 < if(yy_current_buffer -> yy_is_our_buffer == 0) { --- >... (5 Replies)
Discussion started by: breezevinay
5 Replies

6. Shell Programming and Scripting

Grep pattern and display all lines below

Hi I need to grep for a patter and display all lines below the pattern. For ex: say my file has the below lines file1 file2 file3 file4 file5 I NEED to grep for patter file3 and display all lines below the pattern. do we have an option to get this data. Let me know if you require... (5 Replies)
Discussion started by: venkidhadha
5 Replies

7. Shell Programming and Scripting

Grep lines before a pattern having some other pattern

Hi All, I am trying to fetch lines before a pattern, I got to know about -B flag in grep but we have to pass the number to get those lines before some pattern say (X), now what if I want to get line/s with some other pattern say (Y) before X pattern? How to get about it? please help. Input:... (5 Replies)
Discussion started by: dips_ag
5 Replies

8. UNIX for Dummies Questions & Answers

Grep -v lines starting with pattern 1 and not matching pattern 2

Hi all! Thanks for taking the time to view this! I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern. Example: Drink a soda Eat a banana Eat multiple bananas Drink an apple juice Eat an apple Eat multiple apples I... (8 Replies)
Discussion started by: demmel
8 Replies

9. 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

10. UNIX for Beginners Questions & Answers

Grep/awk using a begin search pattern and end search pattern

I have this fileA TEST FILE ABC this file contains ABC; TEST FILE DGHT this file contains DGHT; TEST FILE 123 this file contains ABC, this file contains DEF, this file contains XYZ, this file contains KLM ; I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
TFTPD(8)						    BSD System Manager's Manual 						  TFTPD(8)

NAME
tftpd -- DARPA Trivial File Transfer Protocol server SYNOPSIS
tftpd [-n] [-s] [directory ...] DESCRIPTION
Tftpd is a server which supports the DARPA Trivial File Transfer Protocol. The TFTP server operates at the port indicated in the 'tftp' ser- vice description; see services(5). The server is normally started by inetd(8). The use of tftp(1) does not require an account or password on the remote system. Due to the lack of authentication information, tftpd will allow only publicly readable files to be accessed. Files may be written only if they already exist and are publicly writable. Note that this extends the concept of ``public'' to include all users on all hosts that can be reached through the network; this may not be appropriate on all systems, and its implications should be considered before enabling tftp service. The server should have the user ID with the lowest possible privilege. Access to files may be controlled by invoking tftpd with a list of directories by including pathnames as server program arguments in /etc/inetd.conf. In this case access is restricted to files whose names are prefixed by the one of the given directories. If no directories are supplied the default is /tftpboot. To give out access to the whole filesystem, should this be desired for some reason, supply / as an argument. Unfortunately, on multi-homed systems, it is impossible for tftpd to determine the address on which a packet was received. As a result, tftpd uses two different mechanisms to guess the best source address to use for replies. If the socket that inetd(8) passed to tftpd is bound to a particular address, tftpd uses that address for replies. Otherwise, tftpd uses ``UDP connect'' to let the kernel choose the reply address based on the destination of the replies and the routing tables. This means that most setups will work transparently, while in cases where the reply address must be fixed, the virtual hosting feature of inetd(8) can be used to ensure that replies go out from the correct address. These considerations are important, because most tftp clients will reject reply packets that appear to come from an unexpected address. The options are: -n Suppresses negative acknowledgement of requests for nonexistent relative filenames. -s All absolute filenames are treated as if they were preceded by the first directory argument, or /tftpboot if there is none. SEE ALSO
tftp(1), inetd(8) HISTORY
The tftpd command appeared in 4.2BSD. Linux NetKit (0.17) July 29, 2000 Linux NetKit (0.17)
All times are GMT -4. The time now is 10:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy