Sponsored Content
Full Discussion: deleting record file
Top Forums UNIX for Dummies Questions & Answers deleting record file Post 2149 by yatno on Monday 23rd of April 2001 10:09:02 PM
Old 04-23-2001
Question

if in my file consist with record like this :

AAA1234567
BBB3314134
AAA1232134
CCC1231232
DDD0980980
AAA8098090

And I want to delete record
which substring(record,1,3)="AAA".

Is it possible to do that (deleting specific record) by unix shell script or perl without coding any high level language (like C or java).
if it is possible, what is the command/ statement ?

thank's for your kind answer.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

splitting a record and adding a record to a file

Hi, I am new to UNIX scripting and woiuld appreicate your help... Input file contains only one (but long) record: aaaaabbbbbcccccddddd..... Desired file: NEW RECORD #new record (hardcoded) added as first record - its length is irrelevant# aaaaa bbbbb ccccc ddddd ... ... ... (1 Reply)
Discussion started by: rsolap
1 Replies

2. UNIX for Advanced & Expert Users

Script to search a bad record in a file then put the record in the bad file

I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file. Example: File1 Name designation dateOfJoining... (1 Reply)
Discussion started by: shilendrajadon
1 Replies

3. Shell Programming and Scripting

Script to search a bad record in a file then put the record in the bad file

I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file. Example: File1 Name designation dateOfJoining... (2 Replies)
Discussion started by: shilendrajadon
2 Replies

4. UNIX for Dummies Questions & Answers

how to read record by record from a file in unix

Hi guys, i have a big file with the following format.This includes header(H),detail(D) and trailer(T) information in the file.My problem is i have to search for the character "6h" at 14 th and 15 th position in all the records .if it is there i have to write all those records into a... (1 Reply)
Discussion started by: raoscb
1 Replies

5. Shell Programming and Scripting

Reject the record if the record in the next line does not satisfy the pattern

Hi, I have a input file with the following entries: 1one 2two 3three 1four 2five 3six 1seven 1eight 1nine 2ten The output should be 1one 2two 3three 1four 2five 3six (2 Replies)
Discussion started by: supchand
2 Replies

6. Shell Programming and Scripting

Deleting record in a file by looking up another file

I have two files which are pipe delimited "|". Also, each record in these files will end with a "|" File 1 ==== EMPID|NAME|DEPT 1|AAA|PPP 2|BBB|QQQ 3|CCC|RRR 4|DDD|SSS 5|EEE|TTT File 2 (EMPID of those employees who have left the organisation) ==== EMPID| 2| 5| I have to... (8 Replies)
Discussion started by: machomaddy
8 Replies

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

8. Shell Programming and Scripting

How to compare current record,with next and previous record in awk without using array?

Hi! all can any one tell me how to compare current record of column with next and previous record in awk without using array my case is like this input.txt 0 32 1 26 2 27 3 34 4 26 5 25 6 24 9 23 0 32 1 28 2 15 3 26 4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies

9. Shell Programming and Scripting

Extract timestamp from first record in xml file and it checks if not it will replace first record

I have test.xml <emp><id>101</id><name>AAA</name><date>06/06/14 1811</date></emp> <Join><id>101</id><city>london</city><date>06/06/14 2011</date></join> <Join><id>101</id><city>new york</city><date>06/06/14 1811</date></join> <Join><id>101</id><city>sydney</city><date>06/06/14... (2 Replies)
Discussion started by: vsraju
2 Replies

10. Shell Programming and Scripting

Need code for updating second record to first record in shell scripting

Hi,, I have requirement that i need to get DISTINCT values from a table and if there are two records i need to update it to one record and then need to submit INSERT statements by using the updated value as a parameter. Here is the example follows.. SELECT DISTINCT ID FROM OFFER_GROUP WHERE... (1 Reply)
Discussion started by: Samah
1 Replies
any(3erl)						     Erlang Module Definition							 any(3erl)

NAME
any - the corba any type DESCRIPTION
This module contains functions that gives an interface to the CORBA any type. Note that the any interface in orber does not contain a destroy function because the any type is represented as an Erlang record and there- for will be removed by the garbage collector when not in use. The type TC used below describes an IDL type and is a tuple according to the to the Erlang language mapping. The type Any used below is defined as: -record(any, {typecode, value}). where typecode is a TC tuple and value is an Erlang term of the type defined by the typecode field. EXPORTS
create() -> Result create(Typecode, Value) -> Result Types Typecode = TC Value = term() Result = Any The create/0 function creates an empty any record and the create/2 function creates an initialized record. set_typecode(A, Typecode) -> Result Types A = Any Typecode = TC Result = Any This function sets the typecode of A and returns a new any record. get_typecode(A) -> Result Types A = Any Result = TC This function returns the typecode of A . set_value(A, Value) -> Result Types A = Any Value = term() Result = Any This function sets the value of A and returns a new any record. get_value(A) -> Result Types A = Any Result = term() This function returns the value of A . Ericsson AB orber 3.6.20 any(3erl)
All times are GMT -4. The time now is 12:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy