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 Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 27 June 2017, 11:37 AM EDT
Location: Simplicity
Posts: 3,582
Thanks: 282
Thanked 1,191 Times in 1,077 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.