bash manipulating string
FileName="/var/www/html/index.html"
echo "${FileName}"
/var/www/html/index.html
echo "${FileName%/*}"
/var/www/html
echo "${FileName##*/}"
index.html
TmpVal=$(echo "${FileName%.*}")
echo "${TmpVal##*/}"
index
Description
↧