Sponsored Content
Full Discussion: delete records from a file
Top Forums Shell Programming and Scripting delete records from a file Post 302135535 by DILEEP410 on Monday 10th of September 2007 09:49:00 AM
Old 09-10-2007
Java

But it won't match for a field value 'comabcpvt'.For that just use /abc/ in the regex.

With regards
Dileep Pattayath
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Delete Duplicate records from a tilde delimited file

Hi All, I want to delete duplicate records from a tilde delimited file. Criteria is considering the first 2 fields, the combination of which has to be unique, below is a sample of records in the input file 1620000010338~2446694087~0~20061130220000~A00BCC1CT... (5 Replies)
Discussion started by: irshadm
5 Replies

2. UNIX for Dummies Questions & Answers

Use records from one file to delete records in another file

file_in_1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 file_in_2: 9 10 11 12 21 22 23 24 1 2 3 4 17 18 19 20 file_out: (5 Replies)
Discussion started by: kenneth.mcbride
5 Replies

3. UNIX for Dummies Questions & Answers

How can you delete records in a file matching a pattern?

I am curious if the following can be done in a file in unix. Let's say I have a flat file with the following data AAA,12,2,,,, BBB,3,1,,,, CCC,,,,, DDD,2,,,,, SQQ,,,,, ASJ,,3,5 I only want to capture the data with values into a new file. If the data contains the pattern ,,,,, as in... (2 Replies)
Discussion started by: mode09
2 Replies

4. UNIX and Linux Applications

How to delete files with no records?

Hi, I have a file whose size is not zero but it has no records and another which has records. I want to delete all the files that have no records in it (even if size > 0). How do I do it? I have tried the below option #!/bin/ksh temp1 = $(wc -l < INVX102C.sf) if ; then echo "Data... (3 Replies)
Discussion started by: sangharsh
3 Replies

5. UNIX for Dummies Questions & Answers

Grep specific records from a file of records that are separated by an empty line

Hi everyone. I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this: ID: 20 Name: X Age: 19 ID: 21 Name: Z ID: 22 Email: xxx@yahoo.com Name: Y Age: 19 I want to grep records that... (4 Replies)
Discussion started by: Atrisa
4 Replies

6. Shell Programming and Scripting

Need unix commands to delete records from one file if the same record present in another file...

Need unix commands to delete records from one file if the same record present in another file... just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file.. tried with grep and while... (6 Replies)
Discussion started by: msathees
6 Replies

7. UNIX for Dummies Questions & Answers

Delete records from a big file based on some condition

Hi, To load a big file in a table,I have a make sure that all rows in the file has same number of the columns . So in my file if I am getting any rows which have columns not equal to 6 , I need to delete it . Delimiter is space and columns are optionally enclosed by "". This can be ... (1 Reply)
Discussion started by: hemantraijain
1 Replies

8. Shell Programming and Scripting

Delete records within a file upon a condition

Hi Friends, I have the following file, cat input chr1 1000 2000 chr1 600 699 chr1 701 1000 chr1 600 1710 chr2 900 1800 Now, I would like to see the difference of Record1.Col2 - Record2.Col2 Record1.Col2 - Record2.Col3 Record1.Col3 - Record2.Col2 Record1.Col3 - Record2.Col3 ... (1 Reply)
Discussion started by: jacobs.smith
1 Replies

9. UNIX for Dummies Questions & Answers

Delete records based on a text file from a text file

Hi Folks, I am a novice and need to build a script in bash. I have 2 text files data.txt file is big file, column 2 is the we need to search and delete in the output. The filter file contains the rows to be deleted. Data.txt state city zone Alabama Huntsville 4 California SanDiego 3... (3 Replies)
Discussion started by: tech_frk
3 Replies

10. Shell Programming and Scripting

Delete the records in file based on lookup file.

Hi I have two files one.txt and two.txt one.txt 123 324 456 235 456 two txt abc one 000 123 abc abc one 000 456 abc abc one 000 122 abc abc one 000 111 abc My question here is, the records which are present in one.txt has to deleted in second file two.txt my output result... (2 Replies)
Discussion started by: Ganesh L
2 Replies
ACHECK-RULES.5(5)					User Contributed Perl Documentation					 ACHECK-RULES.5(5)

NAME
set.rules - Rules set for acheck DESCRIPTION
Rules set files contain rules to be check by acheck. Lines beginning with a number sign (`#') and empty lines will be ignored. Spaces at the beginning and the end of a line will also be ignored as well as tabulators. If you need spaces at the end or the beginning of a value you can use apostrophes (`"'). A comment starts with the number sign, there can be any number of spaces and/or tab stops in front of the #. Long lines can be broken into multiple lines ending with a backslash (`'). Some possible examples: # this line is ignored field value field value # this is a comment field "value ending with space " field value continuing on the next line You have to escape number signs with a backslash to use it in a value and use apostrophes if a value ends with a backslash. Rule sets are made of lists of rules. Theses lists can be repeated a number of times, until or while a condition happens. A rule detects an error if the corresponding test succeeds and none of its validation tests does. Each rule can then produce some fixes, a warning or an error, and provide hints to help the operator to correct the error. Parts of the text can be set as comments and so no rule and no spell check will be performed on them. RULE FILE SYNTAX
SYNTAX RULES
list A list starts at a `list' statement, and stops at the first `end_list' or at the end of the file. Mandatory fields: type type until, perform the list until the current line matches `test' while, perform the lint while the current line matches `test' loop, perform the list `test' times test regex / number A regex for `until' and `while' lists. The number of times the list must be performed for `loop', or `0' for infinite loop. Optional fields: name name Use this to give the list a name. spell yes / no Set it to `yes' (default) or `no', if you want or don't want spelling to be checked in the lines matching this list. This value will be inherited by the nested lists. Sub-rules: list [name] rule [name] comment [name] Followed by the name of the sub-rule or its definition for an anonymous sub-rule. rule A rule starts at a `rule' statement, and stops at the first `end_rule' or at the beginning of a comment or a list. Mandatory fields: type type fix, rule provides fixes and hints thought a menu autofix, rule fixes the mistake with no interaction warning, rule issues a warning error, rule issues an error nop, special rule that do nothing, no other field is required regex regex The regex to be match to found this error. Patterns can be captures and then used in the `fix' expression. fix expr Provides a correction for the rule, this field can be repeated to provides more than one choice. Only the first one will be used for `autofix' rules. `warning' and `error' do not provides fixes. The captured patterns can be used here with variables `$1', `$2', and so on. hint text Provides some explanations, this will be used as reviewer comments in review mode. Optional fields: name name Use this to give the rule a name. valid [name] Provides a validation test, it can be named or anonymous. For anonymous validation, the test definition must follow. This field can be repeated more than once, if any of the validation test succeed, the rule does not apply. valid A validation test starts at a `valid' statement, and stops at the first `end_valid' or at the beginning of a rule, a comment, a list or another validation test. Mandatory field: pre regex in regex> post regex Try the regex before, in or after the match of the regex rule. At least one of these test must be provided. If all tests are success- ful, the rule won't apply. Optional field: name name Use this to give the validation test a name. comment A comment starts at a `comment' statement, and stops at the first `end_comment' or at the beginning of a rule, a comment or a list. Comments are just skipped, no other rule and no spelling are performed on them. Mandatory field: skip regex A regex matching the text of the comment. Do not use `start' and `stop' with this. start regex stop regex Regexs defining the beginning and the end of the comment, all the text between will be considered as comment. Do not use `skip' with this. Optional fields: name name Use this to give the comment a name. start_offset stop_offset Defines where the comment really starts or end. Values are `s' for the place the match starts, `s+<n>' for n characters after the match starts, `e' for the place the match ends, or `e-<n>' for n characters before the match ends. Defaults are `s' for `start' matches and `e' for `stop' matches. SEE ALSO
acheck(1), acheck(5) AUTHOR
Nicolas Bertolissio <nico.bertol@free.fr> perl v5.8.4 2003-07-20 ACHECK-RULES.5(5)
All times are GMT -4. The time now is 08:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy