Reading from one file and updating other file with constant entries


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Reading from one file and updating other file with constant entries
# 8  
Old 04-21-2011
Code:
/^uid:/ &&  toupper($2) in f2 {f++}

This User Gave Thanks to vgersh99 For This Post:
# 9  
Old 04-21-2011
Hi Vgersh99,

It is working and thanks for the update.

Sam
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Howto add a constant column to the text file

Hi, I am converting a .DBF file to pipe delimited file my requirement is like lets say my .DBF is residing in path /a/b/c/d/f/abc.DBF I need my .txt file as having a column with source _cd =f sample data in .DBF in folder "f" c1 c2 c3 1 2 3 in txt file it should be... (4 Replies)
Discussion started by: angel12345
4 Replies

2. Shell Programming and Scripting

Need to insert text(constant) at the beginning of file

I am very new to scripting and I know this request is simple but I am having no luck with it. I have a file a.dat with the following data in it. aa bb cc dd I need to run a script that will take each line of a.dat and put dsjc/ubin/ in front of each record, so the output looks like ... (2 Replies)
Discussion started by: jclanc8
2 Replies

3. Shell Programming and Scripting

awk for splitting file in constant chunks

Hi gurus, I wanted to split main file in 20 files with 2500 lines in each file. My main file conatins total 2500*20 lines. Following awk I made, but it is breaking with error. awk '{ for (i = 1; i <= 20; i++) { starts=2500*$i-1; ends=2500*$i; NR>=starts && NR<=ends {f=My$i".txt"; print >> f;... (10 Replies)
Discussion started by: mukesh.lalwani
10 Replies

4. Programming

[Makefile]File + constant problem

Hi guys, I am writing a Makefile with some strange features. What I have is: list of files *.efi list of guids (guid is just a number) one *.efi file is supposed to be used with one guid, so efi file and guid is a pair. What I need is: list of files *.fv How to make *.fv file... (1 Reply)
Discussion started by: Chrisdot
1 Replies

5. Shell Programming and Scripting

reading and updating property file

I have to do a read operation for a field in property file, which looks like follows: 123|xyz|datetime|count '|' is delimiter. Finally I managed to read the contents of property file using statement like cut -d"|" -f1 $PROPERTIES_FILE | tr '\n' ' ' <-- Reading first column But now I... (2 Replies)
Discussion started by: rakeshranjanscs
2 Replies

6. Shell Programming and Scripting

Help with reading file with values and updating another file

Hi I need some help with a task, i am an absolute newbie to any form of shell scripting and request guidance. Task: 1. Read a config file in form of name value pair ex host=www.test.com port=8080 binding="dynamic" or "other" or "something else" key1=value1 key2=value2 key3=value4... (4 Replies)
Discussion started by: mk7074
4 Replies

7. Shell Programming and Scripting

how I can add a constant to a field without changing the file format

Hi, I need to edit a file Protein Data Bank (pdb) and then open that file with the program VMD but when I edit the file with awk, it changes pdb format and the VMD program can not read it. I need to subtract 34 to field 6 ($ 6). this is a pdb file : ATOM 918 N GLY B 103 -11.855 8.675... (8 Replies)
Discussion started by: bio_
8 Replies

8. UNIX for Dummies Questions & Answers

Updating a field in a File without creating temp file's

Hi Experts, I have a requirement where i need to update the below items in file, 1. END TIME 2. PREV_STATUS For the first time the PREV_status and end time of all job the job will be sysdate & NULL reply as below, Session_name,Load Type,Frequency,Seesion End time,Prev_Status... (2 Replies)
Discussion started by: prabhutkl
2 Replies

9. Shell Programming and Scripting

awk updating one file with another, comparing, updating

Hello, I read and search through this wonderful forum and tried different approaches but it seems I lack some knowledge and neurones ^^ Here is what I'm trying to achieve : file1: test filea 3495; test fileb 4578; test filec 7689; test filey 9978; test filez 12300; file2: test filea... (11 Replies)
Discussion started by: mecano
11 Replies

10. Programming

File descriptor constant

I have a requirement to close all the file descriptors from 3 to 1024 for a particular application. Right now, this is how I do it .. for ( int i = 3 ; i <= 1024; ++i ) close(i); The change I am looking at is, I want to do away with the number 1024 and replace it with a constant which... (4 Replies)
Discussion started by: vino
4 Replies
Login or Register to Ask a Question