Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

KORN Remove PID from FIlename 2

Status
Not open for further replies.

awood69

Programmer
Joined
Feb 27, 2012
Messages
19
Location
US
I have a file name like this

report_name.xml.12345

where the 12345 was added by using the $$

I need to remove the
.12345 from the end of the filename before I email it out.

Thanks in advance.
 
Is there a way to do it without using the " * "?
 
Hi

Why ?
Code:
[blue]master #[/blue] name='report_name.xml.12345'
[blue]master #[/blue] echo "${name%.+([0-9])}"
report_name.xml

Feherke.
 
Very cool thanks a lot!
 
Is there somewhere any documentation about this powerfull syntax?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top