![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compare 2 flat files | ganesh123 | Shell Programming and Scripting | 5 | 03-16-2007 02:04 PM |
| How to compare two flat files and get changed data | jtshashidhar | Shell Programming and Scripting | 3 | 01-29-2006 10:26 PM |
| Compare data in 2 files and delete if file exist | lweegp | Shell Programming and Scripting | 3 | 10-13-2005 06:35 AM |
| Compare data files | ithomp | Shell Programming and Scripting | 1 | 06-15-2004 10:08 AM |
| compare update time of files | dorilevy | UNIX for Dummies Questions & Answers | 8 | 05-27-2003 09:48 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to compare data in two flat files and update them?
Hi All,
I am giving an example similar to the problem I have. I have two data files of 10 columns each in which fields are delimited by comma(,). I need to compare compare the two files using the uniq col(col3). If there are any records in file1 and are not in file2 then I have check the value for col4 of those records from a database table, if its success then I have to include those records in file2 and have to change the value of col6 to "updated". Can you please give me an idea how to implement in a shell script. your help will be greatly appreciated. Thanks in Advance. Raju |
|
||||
|
Could you please suggest me how to replace two fields in a flat file which contains more than 40 fields.
If I use sed by searching for the strings there may be a chance that the same string occurs in other fields also. If I use awk I explicitly metion the rest of the 38 fields. Please suggest me how to deal with this. Thanks in advance Raju |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|