i have below list of files so i just want the name of the files in one parameter and not the timestamp.
i want only GIDW_Dy_Tm_Seg_Sls_legacy_PL_0_0_ in variable of all files.
I do not understand what you are trying to do. The title of this thread says you want the last column in a comma separated values file; the body of the 1st message in this thread seems to say that you want the 1st (not last) part of the names (not contents) of the .csv files???
Then you say that you want the names of the files in one parameter??? Where does this parameter come from? What is a "variable of all files"?
Are you saying that after reading your list from standard input, you want a shell variable set to the value?:
yes i want only list of of names in the a .xls file ....i need it for renaming process ....so i will fect the names of files and add current timestamp to all the files using for loop ...
Without the timestamps, your filenames are not unique.
Other than changing the timestamp on the files, what do you want to do?
What do you want to happen to GIDW_Dly_Sls_legacy_RO_0_0_20131001172001.csv ? Do you just want to rename it changing the timestamp from 20131001172001 to the current time? (Note that if that is what you want, you could easily end up destroying some files using this method because your file names with the timestamps removed are not unique, and you may be able to rename several files in a second if you do this without creating a bunch of unneeded temporary files.)
To be more clear here, renuk has the input field separator (FS) set to the underscore character but is using the default output field separator (OFS) which is a space character.