Unix/Linux Go Back    

Find command + replace the extension (.xxx) by *

UNIX for Beginners Questions & Answers

Kindly Note - This is a Single User Post by Forum Member MadeInGermany Regarding:
Find command + replace the extension (.xxx) by *.
Please Follow The Primary Link Above to View the Full Discussion.

Old Unix and Linux 04-21-2017
MadeInGermany MadeInGermany is offline Forum Staff  
Join Date: May 2012
Last Activity: 23 September 2017, 5:20 PM EDT
Location: Simplicity
Posts: 3,748
Thanks: 306
Thanked 1,257 Times in 1,136 Posts
My previous post missed the replacement * in sed 's/[.][^.]*$/*/'.
But still this is different from the original while loop: it does not add the * when there is no .xxxx extension.

BTW your last post has ICODE tags instead of Code tags. The latter work much better for multi-line code blocks.