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

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

drivers - No wi-fi network after install - Ask Ubuntu