Sponsored Content
Top Forums Shell Programming and Scripting Script for updating a .csv file Post 302445837 by suvenduperl on Tuesday 17th of August 2010 03:41:54 AM
Old 08-17-2010
Hello All,

My LOG.txt looks like this:

Code:
DIFFBL INT_1029_Rel6.0.0.90.2163@\DIR_PVOB STD_6.0.0.50_UCM_FOUNDATION_BL.480@\DIR_PVOB (COMPONENT TEA)
Comparing the following:
  INT_1029_Rel6.0.0.90.2163@\DIR_PVOB
  STD_6.0.0.50_UCM_FOUNDATION_BL.480@\DIR_PVOB
Differences:
<< INT_1029_Rel6.0.0.90.2163 (TEA)
>> STD_6.0.0.50_UCM_FOUNDATION_BL.480 (TEA)
  none

DIFFBL INT_1029_Rel6.0.0.90.637@\DIR_PVOB STD_6.0.0.50_UCM_FOUNDATION_BL.9777@\DIR_PVOB (COMPONENT LEAD)
Comparing the following:
  INT_1029_Rel6.0.0.90.637@\DIR_PVOB
  STD_6.0.0.50_UCM_FOUNDATION_BL.9777@\DIR_PVOB
Differences:
<< INT_1029_Rel6.0.0.90.637 (LEAD)
>> STD_6.0.0.50_UCM_FOUNDATION_BL.9777 (LEAD)
  << CQ00024238@\DIR_PVOB "deliver 600_dmb on 20100304.114150."
    M:\srath_view\DIR_source\LEAD\LEAD_se.c@@\main\base2ucm_source\pht_600_int\1
    M:\srath_view\DIR_source\LEAD\LEAD_calc.c@@\main\base2ucm_source\pht_600_int\1
  << CQ00024043@\DIR_PVOB " Std. 6.0 UCM Migration"
    M:\srath_view\DIR_source\LEAD\LEAD_se.c@@\main\base2ucm_source\pht_600_dev_dmb\1
    M:\srath_view\DIR_source\LEAD\LEAD_calc.c@@\main\base2ucm_source\pht_600_dev_dmb\1

Now the file_list.csv looks like this:

There are 3 columns in file_list.csv

1st column: contains (*) mark according to the corresponding row where the file is being changed

2nd column :contains the path of the file as well as the file name

3rd column: contains the version of the file.

Code:
Ex:
column 1                       column 2                                    column 3

  
*                 DIR_source\LEAD\LEAD_se.c                               main\1

             DIR_source\LEAD\LEADcommmon\lead_configFile.h        main\2

*                  DIR_source\LEAD\LEAD_calc.c                            main\3   
                    DIR_source\TEA\TEA_tail.c                            main\2


So As Lead_se.c and Lead_calc.c is changed while comparing two baseline,which we captured it in log.txt.
Now the script should update the 1st column by putting a (*) mark corresponding to the row and by updating the column 3 with the latest version number of the file.........


Hope you all got my point.........

The column2 may contain .c,.h,.txt,.sfg
 

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
PDFBLUR(1)						      General Commands Manual							PDFBLUR(1)

NAME
pdfblur - generate views for depth-of-field blurring SYNOPSIS
pdfblur aperture nsamp viewfile DESCRIPTION
Pdfblur takes the given viewfile and computes nsamp views based on an aperture diameter of aperture (in world coordinate units) and a focal distance equal to the length of the -vd view direction vector. When rendered and averaged together, these views will result in a picture with the specified depth of field. Either pinterp(1) or rpict(1) may be called to do the actual work. (The given viewfile must also be passed on the command line to the chosen renderer, since pdfblur provides supplemental view specifications only.) For pinterp, feed the output of pdfblur to the standard input of pinterp and apply the -B option to blur views together. In most cases, a single picture with z-buffer is all that is required to get a satisfactory result, though the perfectionist may wish to apply three pic- tures arranged in a triangle about the aperature, or alternatively apply the -ff option together with the -fr option of pinterp. (The lat- ter may actually work out to be faster, since rendering three views takes three times as long as a single view, and the -fr option will end up recomputing relatively few pixels by comparison.) To use pdfblur with rpict, apply the -S option to indicate a rendering sequence, and set the -o option with a formatted file name to save multiple output pictures. When all the renderings are finished, combine them with the pcomb(1) program, using appropriate scalefactors to achieve an average. Note that using rpict is MUCH more expensive than using pinterp, and it is only recommended if the scene and applica- tion absolutely demand it (e.g. there is prominent refraction that must be modeled accurately). For both pinterp and rpict, the computation time will be proportional to the number of views from pdfblur. We have found a nsamp setting somewhere between 5 and 10 to be adequate for most images. Relatively larger values are appropriate for larger aperatures. The -pd option of rpict may be used instead or in combination with or instead of pdfblur to blur depth-of-field. If used in combination, it is best to set the -pd option to the overall aperture divided by nsamp to minimize ghosting in the output. To simulate a particular camera's aperture, divide the focal length of the lens by the f-number, then convert to the corresponding world coordinate units. For example, if you wish to simulate a 50mm lens at f/2.0 in a scene modeled in meters, then you divide 50mm by 2.0 to get 25mm, which corresponds to an effective aperture of 0.025 meters. EXAMPLES
To use pinterp to simulate an aperture of 0.5 inches on a lens focused at a distance of 57 inches: rpict -vf myview -x 640 -y 480 -z orig.zbf scene.oct > orig.hdr pdfblur 0.5 57 8 orig.hdr | pinterp -B -vf orig.hdr -x 640 -y 480 orig.hdr orig.zbf > blurry.hdr To use rpict exclusively to do the same: pdfblur .5 57 5 myview | rpict -S 1 -vf myview -x 640 -y 480 -o view%d.hdr scene.oct pcomb -s .2 view1.hdr -s .2 view2.hdr -s .2 view3.hdr -s .2 view4.hdr -s .2 view5.hdr > blurry.hdr AUTHOR
Greg Ward BUGS
This program really only works with perspective views. SEE ALSO
pcomb(1), pinterp(1), pmblur(1), pmdblur(1), rcalc(1), rpict(1), vwright(1) RADIANCE
1/24/96 PDFBLUR(1)
All times are GMT -4. The time now is 10:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy