The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-28-2004
kswaraj kswaraj is offline
Registered User
  
 

Join Date: Jun 2004
Location: Brea CA
Posts: 24
how do i change extension

Hi

I am writing a script which does an FTP of a set of files onto another machine and then would have to rename the files into a different extension on the source machine.

for example if the file being sent via FTP is sample.txt. Once the file has been transferred i would want to modify the filename to look like sample.txt.sent.

I couldnt figure out how to do this.

i am trying with this command

mv $(file) $(file).sent

But this doesnt work but gives me a weird message
Usage: file [-c] [-m MagicFile] [-f ListFile] [File...]

I am using AIX 5.1 and bash shell.

Thanks in advance