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

Windows XP installation, no previous version of Windows NT - Super User

crash - Windows Rundll32 (child process of DllHost) is crashing. How can I even identify it? - Super User

16.04 - Errors were encountered while processing in python - Ask Ubuntu