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   -   Original Discussion by royinfo.alain
MadeInGermany MadeInGermany is offline Forum Staff  
Join Date: May 2012
Last Activity: 21 November 2017, 3:10 PM EST
Location: Simplicity
Posts: 3,826
Thanks: 319
Thanked 1,283 Times in 1,161 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.