I am making a script where I need to rename the files but with different names.The file name could be change according to the product
I made a logic but that is not working properly
arr=$(echo a@b@c | tr "@" "\n")
echo $arr
output is a b c
arry=$(echo d@e@f | tr "@" "\n")
echo $arry
output is d e f
for a in $arr;do for l in $arry;do echo $a$l;done;done
But It is not giving me the desiered output.It is giving me the below output
my intention was to rename the file here a b c are files which will renamed with d e and f files.I was using the above logic in my sciript to rename it.File a should be replaced with d,b file with e and c with f.
---------- Post updated at 02:25 PM ---------- Previous update was at 02:23 PM ----------