Sponsored Content
Top Forums Shell Programming and Scripting awk: How to search for a block within a block ? Post 302487039 by DerekAsirvadem on Tuesday 11th of January 2011 08:18:56 AM
Old 01-11-2011
Scrutinizer

Changed my code; it works well. The code is substantially more readable, and the program is shorter.

Thanks again.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search/replace using visual block

Hi, how would we replace a few patterns on the same line with a change of it's own..using visual block on vim editor. ie a file contains lines such as the following: abccss (dfrss)) emailkk abdcss (dfrss)) dmailkk Using visual block once, replacement is indeed to get the following output:... (0 Replies)
Discussion started by: Manan
0 Replies

2. Shell Programming and Scripting

Need help in sed: adding a line after each search block

Hi friends, I have written script that will search & display the block of sql statement. Since there are many blocks of sql statement i am finding it difficult to distinguish between them. The below is the sed command & its result exec sql abc abc abc... (2 Replies)
Discussion started by: frozensmilz
2 Replies

3. Shell Programming and Scripting

Insert Block of Text into a File After a Ranged Search

Hello, I've been racking my brain trying to find a good way to accomplish a task. I need to insert a block of text into a file in the format of FirewallRuleSet proxy-users { FirewallRule allow to 0.0.0.0/0 } I need to insert this block of text (which could have sed special... (2 Replies)
Discussion started by: 0xception
2 Replies

4. UNIX for Advanced & Expert Users

Deciding whether to get a buffer cache block or inode block

I was reading a book on UNIX internals "The design of the UNIX Operating system." There are two memory structures that are confusing me: 1) Buffer cache 2) Inode cache My questions are 1) Does a process get both buffer cache and Indoe cache allocated when it opens/creates a file? 2) if no,... (1 Reply)
Discussion started by: sreeharshasn
1 Replies

5. UNIX for Advanced & Expert Users

Move a block of lines to file if string found in the block.

I have a "main" file which has blocks of data for each user defined by tags BEGIN and END. BEGIN ID_NUM:24879 USER:abc123 HOW:47M CMD1:xyz1 CMD2:arp2 STATE:active PROCESS:id60 END BEGIN ID_NUM:24880 USER:def123 HOW:4M CMD1:xyz1 CMD2:xyz2 STATE:running PROCESS:id64 END (7 Replies)
Discussion started by: grep_me
7 Replies

6. Shell Programming and Scripting

Printing a block of lines from a file, if that block does not contain two patterns using sed

I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed. See below for the example data. ................................server 1............................... running process 1 running... (8 Replies)
Discussion started by: Kesavan
8 Replies

7. Shell Programming and Scripting

Search and comment block of text from apache httpd.conf

I want to search for a block of text in httpd.conf that between two strings and comment it. There are multiple blocks with "<Directory.. and </Directory>" <Directory "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/htdocs"> # # Possible values for the Options directive are... (3 Replies)
Discussion started by: kchinnam
3 Replies

8. Shell Programming and Scripting

How can I extract XML block around matching search string?

I want to extract XML block surrounding search string Ex: print XML block for string "myapp1-ear" surrounded by "<application> .. </application>" Input XML: <?xml version="1.0" encoding="UTF-8"?> <deployment-request> <requestor> <first-name>kchinnam</first-name> ... (16 Replies)
Discussion started by: kchinnam
16 Replies

9. UNIX for Beginners Questions & Answers

Search a string inside a pattern matched block of a file

How to grep for searching a string within a begin and end pattern of a file. Sent from my Redmi 3S using Tapatalk (8 Replies)
Discussion started by: Baishali
8 Replies

10. Shell Programming and Scripting

Search a String between start and end of a block in a file

Hi, I have a scenario where I want to display the output based on the pattern search between the start and end of a block in a file, we can have multiple start and end blocks in a file. Example give below, we need to search between the start block abc and end block def in a file, after that... (5 Replies)
Discussion started by: G.K.K
5 Replies
lnptest2(1)						      General Commands Manual						       lnptest2(1)

NAME
lnptest2 - LNP Client Test Application #2 (shorter test) SYNOPSIS
lnptest2 DESCRIPTION
lnptest2 is an LNP Daemon test client used to test the connection between a client LNP program (in this case lnptest2) and the LNP daemon through the Ir Tower to a corresponding test program running in an RCX. See the FILES section for the location of the RCX test program source code (distributed with this package). OPTIONS
lnptest2 does not support command-line options. USAGE
To run the test: - compile the lnptest2.c RCX program - start the lnpd daemon - download the lnptest2.lx program to the RCX - at the RCX, run the program just downloaded to the RCX - run this lnptest2 program - inspect the output looking for lack of failure messages FILES
/usr/share/doc/lnpd/examples/rcx In this directory is the source to the RCX-side program which is called lnptest2.c but written to be compiled against BrickOS. SEE ALSO
lnptest(1), lnpdll(1), lnpd(8) You can find additional documentation in /usr/share/doc/lnpd (on Debian GNU/Linux systems) AUTHOR
lnptest2 was written by Michael Obenland <mobenland@users.sourceforge.net> This man page was written by Stephen M Moraco <stephen@debian.org> January 23, 2005 lnptest2(1)
All times are GMT -4. The time now is 03:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy