|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
File search variables
I have a remote server that generates files with name format:
Daily_Generated_File_11-14-07.txt. The file name remains the same regardless, but the date portion at the end of the name will change (mm-dd-yy). Can someone supply a script that will search for files with the latest date based on the file name? |
| Sponsored Links | ||
|
|
|
|||
|
Quote:
I need the script to look in a remote directory for today's files. I came up with this and it works, but now how to I get this to run on a remote FTP Server ![]() FILENAME="Daily_Generated_File_$(date +%m-%d-%y).txt" find . -type f -name $FILENAME |
|
|||
|
Okay, it's FTP then.
I suggest you first use FTP to get a listing then enumerate through that listing and decide which is the latest. Then when you know the name, use get to download it. Whether you use two ftp sessions or one depends on how fancy you want to do your coding. |
|
|||
|
Quote:
Now, if only someone would be so gracious as to get me started on this .. ![]() |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script to search for text in a file and copy file | imeadows | UNIX for Dummies Questions & Answers | 9 | 11-12-2008 09:12 PM |
| reading from a file and pass as variables and ignore # in the file | konark | Shell Programming and Scripting | 4 | 11-08-2007 03:55 AM |
| search for the contents in many file and print that file using shell script | cdfd123 | Shell Programming and Scripting | 3 | 10-07-2007 11:17 PM |
| Ksh script - Design ? - Search file and set variables | littlefrog | Shell Programming and Scripting | 9 | 10-04-2007 04:16 PM |
| How to search a pattern inside a zipped file ie (.gz file) with out unzipping it | senraj01 | Shell Programming and Scripting | 2 | 04-26-2006 05:32 AM |