Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Updating a field in a File without creating temp file's Post 302320623 by prabhutkl on Thursday 28th of May 2009 12:27:18 PM
Old 05-28-2009
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
s_d_m_crm_srr_team_sales,Full,Daily,28-MAY-2009 19:30:00,
s_d_m_crm_srr_team_mbrs_sales,Full,Daily,28-MAY-2009 18:30:00,
s_d_m_crm_srr_team_history_sales,Full,Daily,28-MAY-2009 17:30:00,
s_d_m_crm_srr_employees_sales,Full,Daily,28-MAY-2009 19:50:00,
s_d_m_crm_srr_jobs_sales,Full,Daily,28-MAY-2009 11:30:00,
s_d_m_crm_srr_employee_job_hist_sales,Full,Daily,28-MAY-2009 12:30:00,
s_d_m_crm_srr_x_tmbr_cust_sales,Full,Daily,28-MAY-2009 10:30:00,
s_d_m_crm_srr_x_team_tmbr_sales,Full,Daily,28-MAY-2009 11:30:00,
s_d_m_crm_srr_employees_specifics,Full,Daily,28-MAY-2009 09:30:00,
s_d_m_crm_srr_team_hierarchy_sales,Full,Daily,28-MAY-2009 01:30:00,

On successful completion of each job has to update the record's as below reply,

Session_name,Load Type,Frequency,Seesion End time,Prev_Status
s_d_m_crm_srr_team_sales,Full,Daily,29-MAY-2009 19:30:00,SUCCEEDED
s_d_m_crm_srr_team_mbrs_sales,Full,Daily,29-MAY-2009 18:30:00,FAILED
s_d_m_crm_srr_team_history_sales,Full,Daily,28-MAY-2009 17:30:00,
s_d_m_crm_srr_employees_sales,Full,Daily,29-MAY-2009 19:50:00,SUCCEEDED
s_d_m_crm_srr_jobs_sales,Full,Daily,29-MAY-2009 11:30:00,SUCCEEDED
s_d_m_crm_srr_employee_job_hist_sales,Full,Daily,29-MAY-2009 12:30:00,SUCCEEDED
s_d_m_crm_srr_x_tmbr_cust_sales,Full,Daily,29-MAY-2009 10:30:00,SUCCEEDED
s_d_m_crm_srr_x_team_tmbr_sales,Full,Daily,29-MAY-2009 11:30:00,SUCCEEDED
s_d_m_crm_srr_employees_specifics,Full,Daily,29-MAY-2009 09:30:00,SUCCEEDED
s_d_m_crm_srr_team_hierarchy_sales,Full,Daily,29-MAY-2009 01:30:00,SUCCEEDED

Since I am going to run the all the jobs parallely and there is high possiblity of updating the status and END TIME parallely in a file.

It has to update only one record in file without any temporary file to miss the latest updation.

It will be grateful if you could help me out to get sort out my requirement?

Thanks,
Prabhu
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append to end of each line of file without a temp file.

Hello I am trying to append an incrimenting number to the end of each line I have it working with a temp file. But I want to do this without a temp file. a=1 cat "file" | while read LINE do echo "$LINE, $a" >> filewithnumbers a=`expr $a + 1` ... (4 Replies)
Discussion started by: rorey_breaker
4 Replies

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

3. Shell Programming and Scripting

find and replace a string in a file without the use of temp file

Hi - I am looking for a replacing a string in a in multiple *.sql files in directory with a new string without using a temporary file Normally I can use sed command as below for W in ls `FILE*.sql` do sed 's/OLD/NEW/g' $W > TEMPFILE.dat mv TEMPFILE.dat $W done But Here in my... (9 Replies)
Discussion started by: raghutapal
9 Replies

4. Shell Programming and Scripting

Lookup on large file based on a temp file

hello guys Please help me with the below issue I have two files one base file another lookupfile base file abc-001 bcd-001 cde-001 Lookupfile abc-001|11|12 abc-001|11|12 abc-001|11|12 (6 Replies)
Discussion started by: Pratik4891
6 Replies

5. Shell Programming and Scripting

Store the name of an extracted file to a temp file

What would be the best way to store the name of an extracted file from a tar to a text file? I want to extract one file from a tar and store the name of the extracted file to a temp file. tar -xvf tar_file.tar file_to_be_extracted (1 Reply)
Discussion started by: erin00
1 Replies

6. 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
Imager::LargeSamples(3pm)				User Contributed Perl Documentation				 Imager::LargeSamples(3pm)

NAME
Imager::LargeSamples - track/document large sample support SYNOPSIS
# make a large sample image my $im = Imager->new(..., bits => 16); # call some method my $result = $im->$method(...); # was the image modified at its full sample size DESCRIPTION
Imager has had in-memory support for large samples for years now, but many methods still don't work at the higher sample size when supplied with a large sample image. This document will track which methods support large samples and which don't, for future improvements. Support by method Method Support Notes ------ ------- ----- arc Partial [1] box Partial [2] circle Partial [1] convert Full copy Full crop Full difference Full filter Partial Depends on the filter. flip Full flood_fill Partial [1] getpixel Full getsamples Full getscanline Full map None masked Full matrix_transform Full paste Full polygon Partial [1] polyline None read Partial See L<File format large sample support> read_multi Partial See L<File format large sample support> rotate Full rubthrough Full scale Partial Some qtypes support large samples scaleX None scaleY None setpixel Full setscanline Full string Full Preserves large samples, but most font drivers generate 8 or fewer bits of levels of coverage. transform None transform2 None write Partial See L<File format large sample support> write_multi Partial See L<File format large sample support> [1] filling an area using the fill parameter works at the full depth of the image, using filled => 1 and color works at 8-bits/sample [2] box() will fill the area at the supplied color, but outline at 8-bits/sample. File format large sample support Format Format samples Imager support ------ -------------- -------------- BMP 8 8 GIF 8 8 ICO 8 8 JPEG 8, 12 8 PBM 1 1 PGM/PPM 1-16 read any, writes 8, 16 PNG 1, 2, 4, 8, 16 8 RAW 8 SGI 8, 16 8, 16 TGA 8 8 TIFF (many) read/write 8, 16, 32 contig rgb/grey images read/write bi-level read/write 4/8 paletted images Filter larger sample support Filter Large sample support ------ -------------------- autolevels No bumpmap No bumpmap_complex No contrast No conv Yes fountain Yes gaussian Yes gradgen No hardinvert Yes mosaic No postlevels No radnoise No turbnoise No unsharpmask Yes watermark No AUTHOR
Tony Cook <tonyc@cpan.org> perl v5.14.2 2011-06-06 Imager::LargeSamples(3pm)
All times are GMT -4. The time now is 05:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy