command line - bash - echo negation - Ask Ubuntu


echo ${string##*.}   # show after last "." 

how can revert (negate) - show before last "."

${string%.*} remove shortest trailing portion matching .*

see example parameter expansion in excellent bashguide


Comments

Popular posts from this blog

14.04 - Browser-process using high CPU - Ask Ubuntu

nvidia - NV18 [GeForce4 MX 4000] driver - Ask Ubuntu