Sponsored Content
Top Forums Shell Programming and Scripting Removing specific lines from script files. Post 302792265 by RudiC on Wednesday 10th of April 2013 04:05:10 AM
Old 04-10-2013
Try this:
Code:
grep -il find *.tmp | xargs  sed '/find/,/list/ {/;\|run/d; s/find/where/; s/ with /:/}'
define lastn1 = "A"
    define lastn2 = "Z"
    where MPDB_CORE:MREC > 0
    and (LAST_DATE >= fdate and LAST_DATE <= ldate)
    list/nodef/pagelen=0/noblank/pagewid=255
    MPDB_CORE:MREC/wid=9/c=1
          PAT_TEL/col=10/mask="9999999999"
    ;
    run/sub
    rreplace mpimrph
    bye

You may want to refine the "with" substitution part.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need help--script to filter specific lines from multiple txt files

Hi folks, - I have 800 txt files - those files are cisco router configs router1.txt router2.txt ... router800.txt I want to accomplish the following: - I want to have a seperate file with all the filenames that I want to process - I want a script that goes trough all those... (7 Replies)
Discussion started by: I-1
7 Replies

2. Shell Programming and Scripting

Removing specific lines

Hi I have a .conf file having many location tags like <Location /main> AuthName main AuthUserFile /ppt/gaea/passwd_main Require user admin </Location> ...... ... <Location /wonder> AuthName gaea AuthUserFile /ppt/gaea/passwd_gaea Require... (3 Replies)
Discussion started by: catgovind
3 Replies

3. Shell Programming and Scripting

Removing lines from large files.. quickest method?

Hi I have some files that contain be anything up to 100k lines - eg. file100k I have another file called file5k and I need to produce filec which will contain everything in file100k minus what matches in file 5k.. ie. File100k contains 1FP 2FP 3FP File5k contains 2FP I would... (2 Replies)
Discussion started by: frustrated1
2 Replies

4. Shell Programming and Scripting

PERL: removing blank lines from multiple files

Hi Guru's , I have a whole bunch of files in /var/tmp that i need to strip any blank lines from, so ive written the following script to identify the lines (which works perfectly).. but i wanted to know, how can I actually strip the identified lines from the actual source files ?? my... (11 Replies)
Discussion started by: hcclnoodles
11 Replies

5. Shell Programming and Scripting

Removing specific lines using Unix

Hello everyone, I have a fasta file in the following format: >Sic_7657.x01 bhg|7675859 info:546474 ATGCTAGATGCTAGCTAGCTAGCTGCT CGTAGCTAGTCGTAGCTGATGCTAGGC CGATG >Sic_7657.x1 bhg|76675 info:546474 CGATGCTGATGCTGATCGTGATCTGTC CAGTCGAGCTGATGTCGTATGCGGGTG GCTAGCTA >Sic_7658.y1 bhg|76675... (3 Replies)
Discussion started by: ad23
3 Replies

6. UNIX for Dummies Questions & Answers

Removing Lines Shared by Multiple Files

Hey everyone, I have a question about comparing two files. I have two lists of files. The first list, todo.csv, lists a series of compounds my supervisor wants me to perform calculations on. The second list, done.csv, lists a series of compounds that I have already performed calculations on.... (2 Replies)
Discussion started by: Stuart Ness
2 Replies

7. Shell Programming and Scripting

Removing specific records from files when duplicate key

Hello I have been trying to remove a row from a file which has the same first three columns as another row - I have tried lots of different combinations of suggestion on this forum but can't get it exactly right. what I have is 900 - 1000 = 0 900 - 1000 = 2562 1000 - 1100 = 0 1000 - 1100... (7 Replies)
Discussion started by: tinytimmay
7 Replies

8. Shell Programming and Scripting

Removing 3 consecutive lines from script

Hi I need to remove three consecutive lines of code which appear multiple times during a script. Two of the lines also appear in other parts of the scripts and need to stay so I can't strip out the code per se - It needs to be the exact three lines. Hope that makes sense ! Any help much... (5 Replies)
Discussion started by: Grueben
5 Replies

9. Shell Programming and Scripting

How to find files containing two specific lines and delate those lines?

Hi I need to find files in a specified folder where are two specified lines of text and delate that lines. It looks like this" 35. ?>NL 36. <iframe>.......</iframe>NLThe problem is that "?>" is in the other lines and id should not be removed if the next line is not like "<iframe>....." So... (4 Replies)
Discussion started by: androwida
4 Replies

10. UNIX for Beginners Questions & Answers

How to print lines from a files with specific start and end patterns and pick only the last lines?

Hi, I need to print lines which are matching with start pattern "SELECT" and END PATTERN ";" and only select the last "select" statement including the ";" . I have attached sample input file and the desired input should be as: INPUT FORMAT: SELECT ABCD, DEFGH, DFGHJ, JKLMN, AXCVB,... (5 Replies)
Discussion started by: nani2019
5 Replies
BIO_find_type(3SSL)						      OpenSSL						       BIO_find_type(3SSL)

NAME
BIO_find_type, BIO_next - BIO chain traversal SYNOPSIS
#include <openssl/bio.h> BIO * BIO_find_type(BIO *b,int bio_type); BIO * BIO_next(BIO *b); #define BIO_method_type(b) ((b)->method->type) #define BIO_TYPE_NONE 0 #define BIO_TYPE_MEM (1|0x0400) #define BIO_TYPE_FILE (2|0x0400) #define BIO_TYPE_FD (4|0x0400|0x0100) #define BIO_TYPE_SOCKET (5|0x0400|0x0100) #define BIO_TYPE_NULL (6|0x0400) #define BIO_TYPE_SSL (7|0x0200) #define BIO_TYPE_MD (8|0x0200) #define BIO_TYPE_BUFFER (9|0x0200) #define BIO_TYPE_CIPHER (10|0x0200) #define BIO_TYPE_BASE64 (11|0x0200) #define BIO_TYPE_CONNECT (12|0x0400|0x0100) #define BIO_TYPE_ACCEPT (13|0x0400|0x0100) #define BIO_TYPE_PROXY_CLIENT (14|0x0200) #define BIO_TYPE_PROXY_SERVER (15|0x0200) #define BIO_TYPE_NBIO_TEST (16|0x0200) #define BIO_TYPE_NULL_FILTER (17|0x0200) #define BIO_TYPE_BER (18|0x0200) #define BIO_TYPE_BIO (19|0x0400) #define BIO_TYPE_DESCRIPTOR 0x0100 #define BIO_TYPE_FILTER 0x0200 #define BIO_TYPE_SOURCE_SINK 0x0400 DESCRIPTION
The BIO_find_type() searches for a BIO of a given type in a chain, starting at BIO b. If type is a specific type (such as BIO_TYPE_MEM) then a search is made for a BIO of that type. If type is a general type (such as BIO_TYPE_SOURCE_SINK) then the next matching BIO of the given general type is searched for. BIO_find_type() returns the next matching BIO or NULL if none is found. Note: not all the BIO_TYPE_* types above have corresponding BIO implementations. BIO_next() returns the next BIO in a chain. It can be used to traverse all BIOs in a chain or used in conjunction with BIO_find_type() to find all BIOs of a certain type. BIO_method_type() returns the type of a BIO. RETURN VALUES
BIO_find_type() returns a matching BIO or NULL for no match. BIO_next() returns the next BIO in a chain. BIO_method_type() returns the type of the BIO b. NOTES
BIO_next() was added to OpenSSL 0.9.6 to provide a 'clean' way to traverse a BIO chain or find multiple matches using BIO_find_type(). Previous versions had to use: next = bio->next_bio; BUGS
BIO_find_type() in OpenSSL 0.9.5a and earlier could not be safely passed a NULL pointer for the b argument. EXAMPLE
Traverse a chain looking for digest BIOs: BIO *btmp; btmp = in_bio; /* in_bio is chain to search through */ do { btmp = BIO_find_type(btmp, BIO_TYPE_MD); if(btmp == NULL) break; /* Not found */ /* btmp is a digest BIO, do something with it ...*/ ... btmp = BIO_next(btmp); } while(btmp); SEE ALSO
TBA 1.0.0e 2000-09-14 BIO_find_type(3SSL)
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy