HI All
I would like to cut a part of the file name
I have a flat file lets say ABC12345.TXT and 2nd file name is DELL500.TXT
file_name=$(echo ABC12345.TXT | sed/\.TXT//)
file2=DELL500.TXT
I would like to create a new name by joining some parts of both the names;
I want the out put to be ABC12345L500.log
So far I am able to join both the names like
ABC12345DELL500.TXT.log by using the folloing;
new_name=$file_name$file2.log
How can I cut some part from a the file name. I tried to use cut using -c option but its cutting the contents of the file.
Thanks
I would like to cut a part of the file name
I have a flat file lets say ABC12345.TXT and 2nd file name is DELL500.TXT
file_name=$(echo ABC12345.TXT | sed/\.TXT//)
file2=DELL500.TXT
I would like to create a new name by joining some parts of both the names;
I want the out put to be ABC12345L500.log
So far I am able to join both the names like
ABC12345DELL500.TXT.log by using the folloing;
new_name=$file_name$file2.log
How can I cut some part from a the file name. I tried to use cut using -c option but its cutting the contents of the file.
Thanks