Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

changing filename extension

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 01-24-2009
Hiso Hiso is offline
Registered User
 
Join Date: Jan 2009
Last Activity: 23 June 2011, 6:20 AM EDT
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
changing filename extension

Hi All,
i need to change the filename extension. For simplicity, we can assume that the extension after '.' is 3 characters only... but the filenames can vary.

eg. changing from abc.doc to abc.dxs

can i have a oneline command to achieve this
Sponsored Links
    #2  
Old Unix and Linux 01-24-2009
Zaxon Zaxon is offline
Registered User
 
Join Date: Jan 2009
Last Activity: 28 December 2009, 2:30 AM EST
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Give it a shot below:
mv *.doc *.dxs
Sponsored Links
    #3  
Old Unix and Linux 01-24-2009
Hiso Hiso is offline
Registered User
 
Join Date: Jan 2009
Last Activity: 23 June 2011, 6:20 AM EDT
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Funny...
I dont want to move from .doc to .dxs.
Actually .dxs will be the compiled version of .doc... so i am writing a script which will compile all .docs (for eg) and move all the created .dxs's (i.e, created after compilation) to another folder.
    #4  
Old Unix and Linux 01-24-2009
Zaxon Zaxon is offline
Registered User
 
Join Date: Jan 2009
Last Activity: 28 December 2009, 2:30 AM EST
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
So you could pointed to the format of file.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Changing the extension of the file mazhar803 UNIX for Dummies Questions & Answers 4 08-29-2008 09:20 AM
Changing extension mohan705 Shell Programming and Scripting 4 06-30-2007 01:06 PM
separating filename and extension lucaspewkas Shell Programming and Scripting 2 04-06-2007 07:07 AM
filename extension check - regular expression devs Shell Programming and Scripting 4 03-02-2007 02:01 PM
Lynx - Downloading - extension handling - changing mime type? yitzle UNIX for Dummies Questions & Answers 2 10-17-2006 11:46 PM



All times are GMT -4. The time now is 06:35 AM.