|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
To put it mildly, my script writing abilities suck. I have therefore decided to seek the assistance of someone who is willing to write a script for me.
First of all, I am running FreeBSD 5.4. Besides the base shell, I also have Bash 3.00.16(1), php 5.0.5 (cli), ruby 1.8.2 and Perl 5.8.7 installed. I am presently running DADA Mail to deliver a newsletter nightly. In order to send a different message nightly, I have to enter the file name for each file that is to be sent. I have named all of the files to be sent according to the date; i.e., 11-01-05.txt, 11-02-05.txt, etc. All of the files are kept in the same directory. What I want is a simple script that would run from CRON once daily. The script would sort the directory and then move the first file to a file named: “2Bsent.txt” in the same directory. By moving the file to the new name, the original files would be removed which is what I want. I have never been able to accomplish this seemingly simple feat. -- Ciao |
|
#2
|
||||
|
||||
|
Have you anything to go on, or is this sorted?
__________________
--Ax without exception, there is no rule ... The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones ![]() 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. -- Jamie Zawinski Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ... |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > Sorting Directory and Moving File |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|