Date: Mon, 6 Jun 2005 19:03:24 -0400
Reply-To: harry.droogendyk@RBC.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Harry Droogendyk <harry.droogendyk@RBC.COM>
Subject: Re: Unix Question
Content-Type: text/plain; charset="iso-8859-1"
untested:
filename dir pipe 'ls -t myfile*'; * sort reverse chronologically;
data _null_;
length fname $32;
infile dir;
input fname;
call system('cp '||fname || ' etc... ');
stop;
run;
-----Original Message-----
From: owner-sas-l@listserv.uga.edu
[mailto:owner-sas-l@listserv.uga.edu]On Behalf Of Ross, Michael D
Sent: Monday, June 06, 2005 5:39 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Unix Question
Hi All,
I want to copy the last "myfile.xpt.<x>.gz" to another directory. How can
I pick up the last myfile by the most recent date using Sas code?
call system(cp myfile <some date option here maybe>
-rw-r--r-- 1 qqqccc qqq 827392 Jun 4 11:01 myfile.xpt.10.gz
-rw-r--r-- 1 qqqccc qqq 8142848 Jun 5 11:01 myfile.xpt.11.gz
-rw-r--r-- 1 qqqccc qqq 9396224 Jun 6 11:01 myfile.xpt.12.gz
Any suggestions?
Thanks.
Mike
__________________________________________________________________________________________________________________________________
This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations.
Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized.
If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.
Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent.
Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite.
Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.