Sponsored Content
Top Forums Shell Programming and Scripting Script for updating a .csv file Post 302445455 by suvenduperl on Monday 16th of August 2010 04:03:54 AM
Old 08-16-2010
Script for updating a .csv file

Hello guys,

I have one .csv file with all the file names(.c,.h,.sm,.txt etc).....
Now i have compared two baseline in UCM and got a report in .txt file,which looks like this......

Code:
DIFFBL INT_1029_Rel6.0.0.90@\DIR_PVOB STD_6.0.0.50_UCM@\DIR_PVOB (COMPONENT TEXT)
Comparing the following:
  INT_1029_Rel6.0.0.90@\DIR_PVOB
  STD_6.0.0.50_UCM@\DIR_PVOB
Differences:
<<  INT_1029_Rel6.0.0.90 (TEXT)
>>  STD_6.0.0.50_UCM (TEXT)
  none

DIFFBL INT_1029_Rel6.0.0.90@\DIR_PVOB STD_6.0.0.50_UCM@\DIR_PVOB (COMPONENT TEA)
Comparing the following:
  INT_1029_Rel6.0.0.90@\DIR_PVOB
  STD_6.0.0.50_UCM@\DIR_PVOB
Differences:
<< INT_1029_Rel6.0.0.90 (TEA)
>> STD_6.0.0.50_UCM (TEA)
"    M:\shah_view\DIR_source\TEA\TEA_CabinSDmonitoring.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_CanBusLine.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_CustomisedArea.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_PowerSupply.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_SDF_Task.c@@\main\base2ucm_source\main\1
    M:\vshah_view\DIR_source\TEA\TEA_private.h@@\main\base2ucm_source\main\1
  M:\shah_view\DIR_source\TEA\TEA_PTT.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_private.h@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_CabinSDmonitoring.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_CanBusLine.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_CustomisedAreaSDF.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_PowerSupply.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_SDF_Task.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_private.h@@\main\base2ucm_source\main\1
  
    M:\shah_view\DIR_source\TEA\TEA_PTT.c@@\main\abase2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_private.h@@\main\base2ucm_source\main\1
"    M:\shah_view\DIR_source\TEA\TEA_SDF_Task.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_CustomisedAreaSDF.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_CanBusLine.c@@\main\abase2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\CBC_CabinSDmonitoring.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_private.h@@\main\abase2ucm_source\main\2
    M:\shah_view\DIR_source\TEA\TEA_private.h@@\main\abase2ucm_source\main\1
  
    M:\shah_view\DIR_source\TEA\TEA_PowerSupply.c@@\main\abase2ucm_source\main\1
 
    M:\shah_view\DIR_source\TEA\TEA_PTT.c@@\main\base2ucm_source\main\1
  
    M:\shah_view\DIR_source\TEA\TEA_PTT.c@@\main\base2ucm_source\main\1
    M:\shah_view\DIR_source\TEA\TEA_private.h@@\main\base2ucm_source\main\1

DIFFBL INT_1029_Rel6.0.0.90@\DIR_PVOB STD_6.0.0.50_UCM@\DIR_PVOB (COMPONENT KEY)
Comparing the following:
  INT_1029_Rel6.0.0.90@\DIR_PVOB
  STD_6.0.0.50_UCM@\DIR_PVOB
Differences:
<< INT_1029_Rel6.0.0.90 (KEY)
>> STD_6.0.0.50_UCM (KEY)
 
    M:\shah_view\DIR_source\KEY\KEY_chimeController.c@@\main\base2ucm_source\main\1
 
    M:\shah_view\DIR_source\KEY\KEY_chimeController.c@@\main\base2ucm_source\main\1

DIFFBL INT_1029_Rel6.0.0.90.603@\DIR_PVOB STD_6.0.0.50_UCM@\DIR_PVOB (COMPONENT LIMITS)
Comparing the following:
  INT_1029_Rel6.0.0.90@\DIR_PVOB
  STD_6.0.0.50_UCM@\DIR_PVOB
Differences:
<< INT_1029_Rel6.0.0.903 (Limits)
>> STD_6.0.0.50_UCM (Limits)
  none


So here i am getting all the file names which are changed.
SO now i want to put a (*) mark an the .csv file (where the file names are changed.)

Like KEY_chimeController.c will be match in the .csv file.
So now .csv should put a (*) mark in the side column of this file.

Hope you guys understood my requirement...

Waiting for your responses......
 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Updating a csv file held on a unix box with excel running on windows

Hi, my question is quite simple: Can I update a csv file which is held on a unix box (and which a script on the same box uses) with Microsoft Excel running in a windows environment? Or, is there a free spreadsheet package available to run in unix that will update my csv file. I know it's easy to... (5 Replies)
Discussion started by: Sn33R
5 Replies

2. Shell Programming and Scripting

script for updating table using file(

Hi, Data file path (.txt) Control file(.ctl) I have delimited file(|). Sample data: 1|name|50009|DS24|0|12 2|name|30009|DS24|0|13 3|name|20409|DS24|0|14 4|name|20009|DS24|0|15 5|name|10009|DS24|0|16 I want to load this data into a oracle table (update and insert) Please help me... (1 Reply)
Discussion started by: unihp1
1 Replies

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

4. Shell Programming and Scripting

Updating a line in a large csv file, with sed/awk?

I have an extremely large csv file that I need to search the second field, and upon matches update the last field... I can pull the line with awk.. but apparently you cant use awk to directly update the file? So im curious if I can use sed to do this... The good news is the field I want to... (5 Replies)
Discussion started by: trey85stang
5 Replies

5. Shell Programming and Scripting

Updating a CSV file by multiple PERL scripts

Hi Friends, I'm writing code to update a CSV file by multiple PERL scripts. I've around 2000 PERL scripts which need to register their entries into a CSV file. Hence, I'm inserting following line code in all the 2000 PERL scripts. open(FILE,... (5 Replies)
Discussion started by: Lokesha
5 Replies

6. Shell Programming and Scripting

bash script to find date based on search string for continuesly updating file

Hi All, I am very new to UNIX and I have tried this for a longtime now and unable to crack it.... There is a file that is continuously updating. I need to search for the string and find the date @ which it updated every day..... eg: String is "work started" The log entry is as below: ... (1 Reply)
Discussion started by: Nithz
1 Replies

7. UNIX for Advanced & Expert Users

Creating the script for updating or replacing the existing http.conf file

Hi I need some help with a task, i am an absolute newbie to any form of shell scripting and request guidance. I have been building a proxy server using the apache mod proxy currently my solution is working , but i need to automate the process , suppose if any changes need to be made on... (0 Replies)
Discussion started by: satej
0 Replies
All times are GMT -4. The time now is 11:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy