Problem with string append
I am new to linux shell script and I am currently facing a strange problem. Currently I am working on , in which I have a string and I have to parse it to a specific string.
My problem is as like below.
# data1_data2_data3_data4 /. this string I have got from substring of main string
# now what I want to do is
# that should print data1_data2_data3_data4_dt5_dt6.pdf but instead it prints like below "_dt4_dt6.pdfdata3_data4"
# in short it replaces str1's data with the str2's data from starting of str1
Please help me to solve this strange problem
Thanks in advance