The Memory Bank

...for memory blanks

Site Tools


bash_one-liners

This is an old revision of the document!


bash one-liners

To remove everything after and including the final '.' use: ${var%.*}.
To remove the last 4 characters from 'string', use: new_string=${string::-4}

bash_one-liners.1756788473.txt.gz · Last modified: (external edit)