![]() |
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 |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Updating the input file | prabhutkl | UNIX for Dummies Questions & Answers | 1 | 05-29-2009 05:27 AM |
| Updating the input file | prabhutkl | Shell Programming and Scripting | 1 | 05-29-2009 05:03 AM |
| Reading specific contents from 1 input files and appending it to another input file | sksahu | Shell Programming and Scripting | 5 | 01-14-2009 06:09 AM |
| awk updating one file with another, comparing, updating | mecano | Shell Programming and Scripting | 11 | 09-14-2008 06:50 AM |
| Sed Help in Updating something only in one particular file. | bisla.yogender | Shell Programming and Scripting | 4 | 03-24-2008 11:48 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Updating the input file
Hi Experts,
I have a requirement. input_file.txt Emp_no Emp_Name Salary 100 A 1000 101 B 2500 102 C 1500 I want to update the salary field of a record based on a condition(like emp_no=100). Presently I am using a temperory file for updation. Eg: read the input_file if $1=100 update salary + 1200 else if $1=101 update salary + 1000 ... ... output to a temp file. move temp file input_file.txt remove temp file (I am passing the input_file as the first argument & emp_no as the second argument) I am scheduling the script using crontab.Crotab entry is like this. 23 02 * * 1-5 /usr/bin/sh /isscrmetl/script_test/file_upd.sh input_file.txt 100 23 02 * * 1-5 /usr/bin/sh /isscrmetl/script_test/file_upd.sh input_file.txt 101 23 02 * * 1-5 /usr/bin/sh /isscrmetl/script_test/file_upd.sh input_file.txt 102 Since the script is executing parallely it is not giving the desired output. Can we update the table without using a temperory file. Thanks, Prabhu |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|