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

debian - Kali Linux - Debootstrap error Failed to determine codename for the release - Super User

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

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