unix - Extract part of file name using KornShell -
i have file name, example: xxdatafile_20110120123030_12342.dat
. want extract "xxdatafile_"
file name.
how do using ksh on unix?
$ file=xxdatafile_20110120123030_12342.dat $ echo ${file%%_*} xxdatafile
Comments
Post a Comment