problem with sed commands

In a file with the following lines :

for db in `cat $DbProjListtmp`


`echo $db | awk -F'_' '{ print $1 }' | sed 's/' < $DbProjListtmp > $DbProjList`

`echo $db | awk -F'_' '{ print $2 }' | sed 's/' < $DbProjListtmp > $DbProjList`

`echo $db | awk -F'.prd' '{ print $3 }' | sed 's/prd/prp/g' < $DbProjListtmp > $DbProjList`

`echo $db | awk -F'.world' '{ print $4 }' | sed 's/.world//g' < $DbProjListtmp > $DbProjList`


Only .world has been removed on DbProjList.

I don't see any error on the other lines.


Who is Participating?

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

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.

What result do you get, and what result do you want?
bibi92Author Commented:
The source file contains :

The target file will be contain :

awk -F'[bp]' '{print "server" $2 ".com_db" $2 "prp"}' < source > target
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

bibi92Author Commented:
Thanks, I have to parse in a file containing and it can be contain another lines :
In a file with the following lines :
sed -e 's/11\.32\.11\.84/' -e 's/11\.32\.11\.85/' -e 's/d\.world/p/' < source > target

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
bibi92Author Commented:
perfect, it works thine thanks
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.