Sponsored Content
Top Forums Shell Programming and Scripting Writing given value into a file in particular record and column Post 302256586 by shreekrishnagd on Monday 10th of November 2008 07:12:17 AM
Old 11-10-2008
Writing given value into a file in particular record and column

Hi All,
Could you ppl plz help me in writing into a file , plz find the example below.
Ex:
Name1|092387|Address1
Name2||Address2

After executing command/script the file should look like

Name1|092387|Address1
Name2|+91900236|Address2

plz let me know of you have some solution...
 

10 More Discussions You Might Find Interesting

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

2. Shell Programming and Scripting

Writing out 2nd column into one file from multiple files

I have several files that are being generated every 20 minutes. Each file contains 2 columns. The 1st column is Text, 2nd column is Data. I would like to generate one single file from all these files as follows: One instance of 1st column Text, followed by 2nd column Data separated by... (5 Replies)
Discussion started by: subhap
5 Replies

3. Shell Programming and Scripting

Help in writing a KSH script to filter the latest record?

Hi All, I have a text file with the folowing content. BANGALORE|1417|2010-02-04 08:41:04.174|dob|xxx BANGALORE|1416|2010-02-04 08:23:19.566|dob|yyy BANGALORE|1415|2010-02-04 08:20:14.497|dob|aaa BANGALORE|1414|2010-02-04 08:19:40.065|dob|vvv BANGALORE|1413|2010-02-04... (4 Replies)
Discussion started by: Karpak
4 Replies

4. Shell Programming and Scripting

writing in a file's particular column number of every line during runtime

Given a particular line number and a corresponding column number, can i write something in the file during run time? For example x=1 and during runtime i want to write the value of x in column 100 of every line of a given file, then how shud that be done? Thanks (9 Replies)
Discussion started by: arindamlive
9 Replies

5. Shell Programming and Scripting

Select record having different value in second column

I want records which have more than one and different value in the second column on the below sample file. Ex, I have the samle file below :- XYZ 1 XYZ 3 abc 1 abc 1 qwe 2 qwe 1 qwe 3 I want to select XYZ and QWE line only. (6 Replies)
Discussion started by: Sanjeev Yadav
6 Replies

6. Shell Programming and Scripting

Cat writing only one record in the output file

Hi All, I have an input file containing data as below: Input.DAT XXXXXXX|YYYYYYY|ZZZZZZZZZZ|12334446456|B|YY|111111111|111111111|111111111|111111111|15|3|NNNNNN|Y|3|AAA|111111111... (11 Replies)
Discussion started by: sagar.cumar
11 Replies

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

8. UNIX for Dummies Questions & Answers

Match sum of values in each column with the corresponding column value present in trailer record

Hi All, I have a requirement where I need to find sum of values from column D through O present in a CSV file and check whether the sum of each Individual column matches with the value present for that corresponding column present in the trailer record. For example, let's assume for column D... (9 Replies)
Discussion started by: tpk
9 Replies

9. Shell Programming and Scripting

Split column data if the table has n number of column's with some record

Split column data if the table has n number of column's with some record then how to split n number of colmn's line by line with records Table --------- Col1 col2 col3 col4 ....................col20 1 2 3 4 .................... 20 a b c d .................... v ... (11 Replies)
Discussion started by: Priti2277
11 Replies

10. Shell Programming and Scripting

CSV File:Filter duplicate records from column1 & another column having unique record

Hi Experts, I have csv file with 30, 40 columns Pasting just 2 column for problem description. Need to print error if below combination is not present in file check for column-1 (DocumentNumber) and filter columns where value in DocumentNumber field is same. For all such rows, the field... (7 Replies)
Discussion started by: as7951
7 Replies
lname(3erl)						     Erlang Module Definition						       lname(3erl)

NAME
lname - Interface that supports the name pseudo-objects. DESCRIPTION
This interface is a part of the names library which is used to hide the representation of names. In Orbers Erlang mapping the pseudo-object names and the real IDL names have the same representation but it is desirable that the clients uses the names library so they will not be dependent of the representation. The lname interface supports handling of names e.g. adding and removing name components. Note that the lname interface in orber does not contain a destroy function because the Names are represented as standard Erlang lists and therefor will be removed by the garbage collector when not in use. The type NameComponent used below is defined as: -record('CosNaming_NameComponent', {id, kind=""}). id and kind are strings. The record is defined in the file CosNaming.hrl and it is included with: -include_lib("orber/COSS/CosNaming/CosNaming.hrl"). EXPORTS
create() -> Return Types Return = [NameComponent] This function returns a new name. insert_component(Name, N, NameComponent) -> Return Types Name = [NameComponent] N = int() Return = Name This function returns a name where the new name component has been inserted as component N in Name. get_component(Name, N) -> Return Types Name = [NameComponent] N = int() Return = NameComponent This function returns the N:th name component in Name. delete_component(Name, N) -> Return Types Name = [NameComponent] N = int() Return = Name This function deletes the N:th name component from Name and returns the new name. num_component(Name) -> Return Types Name = [NameComponent] Return = int() This function returns a the number of name components in Name. equal(Name1, Name2) -> Return Types Name1 = Name2 = [NameComponent] Return = bool() This function returns true if the two names are equal and false otherwise. less_than(Name1, Name2) -> Return Types Name1 = Name2 = [NameComponent] Return = bool() This function returns true if Name1 are lesser than Name2 and false otherwise. to_idl_form(Name) -> Return Types Name = [NameComponent] Return = Name This function just checks if Name is a correct IDL name before returning it because the name representation is the same for pseudo and IDL names in orber. from_idl_form(Name) -> Return Types Name = [NameComponent] Return = Name This function just returns the Name because the name representation is the same for pseudo and IDL names in orber. Ericsson AB orber 3.6.20 lname(3erl)
All times are GMT -4. The time now is 09:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy