Thursday, December 6, 2018

How to Remove the date suffix from a file name


echo 'filenamewithdatesuffix.txt_12062018' | grep -o '^.*\.txt'
Output: filenamewithdatesuffix.txt

No comments:

Post a Comment