I have a big file name lef_list with data in below format:
$PRJ/fp/t/std/tcb/libs/tcb.lb.gz \ $PRJ/mm/T/v/mem_gen/ram/NLDM/ram.lib \ I want to read each line of file and split the lines into two based on pattern '/libs/' or '/NLDM/' in line and replace those with word '/LEF/' and write in a new file.
The output should be like :
$PRJ/fp/t/std/tcb/lef/tcb.lb.gz \ $PRJ/mm/T/v/mem_gen/ram/LEF/ram.lib \ I tried the below code:
while IFS="/libs/" read -r line val do echo "$line"/LEF/"$val"; done < lef_list This code shows error as while expression syntax. command not found.
Someone please suggest any solution.