FULLPATH=/usr/share/test/test.sh # remove all the prefix until "/" character FILENAME=${FULLPATH##*/} # remove all the prefix until "." character FILEEXTENSION=${FILENAME##*.} #remove a suffix, in our cas, the filename, this will return the name of the directory BASEDIRECTORY=${FULLPATH%$FILENAME}
2014년 7월 13일 일요일
[linux shell] full path/file name/file extension
피드 구독하기:
댓글
(
Atom
)
댓글 없음 :
댓글 쓰기