My problem is suppose I have one file name dipanjan.conf and the format of this file is as follows-
Name : Ddd Rrr Ooo
Email : abc@pqr.com
Mobile No : +8801911000000
Now, I want to create a new file using this one by shell script giving parameter (1)name, (2)email & (3)mobile no.
Actually I try a lot, but not able to solve this one. Can anybody please help me?
you can read the file line by line and store the parts behind ":" into 3 different arrays.
after that iterating through these arrays and writing into a new created file.
and then load these variables in your environment :
. ./dipanjan.conf
???
I mean, instead of using a wrongly formatted configuration file that you then have to parse, just use a correclty formatted one that you can directly load.