LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2008, 06:26 AM   #1
amaulana
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Rep: Reputation: 0
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!
 
Old 11-14-2008, 11:48 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,892
Blog Entries: 27

Rep: Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182Reputation: 2182
Hi,

Sure sounds and looks like homework to me.
 
Old 11-15-2008, 11:14 PM   #3
amaulana
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Original Poster
Rep: Reputation: 0
thanks for the link onebuck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to rename files bkcreddy17 Programming 7 09-14-2008 10:22 AM
rename files linux2man Linux - General 8 02-03-2007 06:26 AM
rename files allelopath Linux - General 5 07-05-2005 04:00 AM
Transferring 40000+ files with FTP (mget) shows 0 files tim1235 Linux - Software 5 10-17-2004 07:06 PM
Can not rename files. Maximus2000 Linux - General 0 04-22-2004 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration