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