how to search/update a property value in bash

How to update status value using function and passing JOB_NAME and STATUS value and get the response code

Function trying to come up with
=======================================
#!/bin/bash

function CallStatusUpdate(){
  aJobName=$1
  ajobCurrentStatus=$2

  # Search for $1 (job_1) and update job_1_status=$2 (job_1_status="started")

}


returncode=$(CallStatusUpdate "job_1" "started")
echo $returncode

=======================================



Input Task.txt
==============
job_1_name=job1
job_1_asset=task1
job_1_dependent_on="none"
job_1_status="not started"
job_1_description="description of task1"
job_1_arg1="some arg1"
job_1_arg2="some arg2
job_1_arg3="some arg3"
job_1_arg4=none
job_1_arg5=none

job_2_name=job2
job_2_asset=task2
job_2_dependent_on="job1"
job_2_status="not started"
job_2_description="description about this task"
job_2_arg1="some arg1"
job_2_arg2="some arg2
job_2_arg3="some arg3"
job_2_arg4=none
job_2_arg5=none

job_3_name=job3
job_3_asset=task3
job_3_dependent_on="job1,job2"
job_3_status="not started"
job_3_description="description about this task"
job_3_arg1="some arg1"
job_3_arg2="some arg2
job_3_arg3="some arg3"
job_3_arg4=none
job_3_arg5=none
enthuguyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
function CallStatusUpdate(){
  sed -i.bak /${1}_status/s/=.*/=$2/ Task.txt
}

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
enthuguyAuthor Commented:
Thanks ozo, as always :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.