LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   get files from ftp and rename those files.. (https://www.linuxquestions.org/questions/linux-newbie-8/get-files-from-ftp-and-rename-those-files-683343/)

amaulana 11-14-2008 05:26 AM

get files from ftp and rename those files..
 
need your help, please..

I need to automate the task using bourne shell only (#!/bin/sh) and i'm new in shell scripting.

Condition:
-. get files from ftp that created/modified in less than 1 day / 24 hours.
-. the files has name pattern like these:

ABC23D.asc.123
BCD45D.asc.123
GHT12D.asc.123
...

-. say, lokal directory is /home/local and remote directory is /home/remote



What I need is:
1. download those files to local directory
2. rename all downloaded files to:

XYZ_23.asc
XYZ_45.asc
XYZ_12.asc
...


Master!, please help me...... thank you!

onebuck 11-14-2008 10:48 PM

Hi,

Sure sounds and looks like homework to me.

amaulana 11-15-2008 10:14 PM

thanks for the link onebuck!


All times are GMT -5. The time now is 01:08 AM.