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

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User