![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stripping out extension in file name | devs | Shell Programming and Scripting | 9 | 05-14-2008 01:53 AM |
| Truncate multiple file extensions | prvnrk | Shell Programming and Scripting | 12 | 04-04-2008 07:20 AM |
| Stripping out the extension of a file name | ramky79 | Shell Programming and Scripting | 2 | 12-27-2006 11:25 AM |
| find -regex: matching multiple extensions | r0sc0 | Shell Programming and Scripting | 2 | 12-08-2005 11:32 AM |
| stripping last lien off a file | vivekshankar | UNIX for Dummies Questions & Answers | 3 | 05-31-2005 03:35 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
Quote:
After this pattern we have "\..*" wich means a dot and everything after it. Sed uses a greedy match (AKA longest match) so the saved substring will contain the part before the last "." in the substring. Regards |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Quote:
Code:
FNAME=${FILE_NAME%.*}
|
|||
| Google The UNIX and Linux Forums |