0

Let's say I have this file:

/temp/original_file.txt

The content of this file is:

Hello $FirstName, you have to accomplish $Task

I need to read this file, set variables dynamically, and write the result in a new file. For example if FirstName=Jack and Task=Cooking, and the new file is located in /temp/new_file.txt, the content of the new file would be:

Hello Jack, you have to accomplish Cooking

How can I achieve this in shell?

Hossein Fallah
  • 1,859
  • 2
  • 18
  • 44

0 Answers0