|
Joe, You might be getting "too many arguments" because the command instantiates the *.jsp into multiple files. Based on my research, this is not good. Use redirection of standard outpur and input to try the same thing... ls /pathname/*.jsp > tempfile -- redirect output to temp file touch < tempfile -- redirect temp file as input to touch command It might require the tempfile to be fully qualified ( i.e., /qsys.lib/templib.lib/tempfile.file/tempfile.mbr) Let me know how it works out...my unix has rusted over the past 20+ years! William date: Fri, 14 May 2004 11:21:34 -0700 (PDT) from: William Washington III subject: Re: Recursive touching... Whoo hoo! Joe, I'm not a java-guy (yet), but the RPG or CL way I have used is to use some QSH commands and pipe the information to a temporary file, then process the temporary file in RPG. Example: in CL: CRTPF FILE(tmplib/tmpfile) CHGVAR &cmd ('cd /filepath/ && ls *.ext > /qsys.lib/tmplib.lib/tmpfile.file/tmpmbr.mbr') STRQSH CMD(&CMD) This will place the contents of everything in the IFS directory specified by the filepath with extension .ext into the temporary file. Next, just open an RPG program with the temporary file overridden and process. You will probably want to make a command that calls the CL program to do the work. I've simplified this process, but not by much. Look in a QSHELL reference for switches on the ls command. I think this will get you going... William date: Thu, 13 May 2004 15:41:05 -0500 from: "Joe Pluta" subject: Recursive touching... Whoo hoo! Alright, I give. What's the easiest programmatic way to touch a file in the IFS? I wanted to do "touch *.jsp" in a folder, and I get the dreaded "too many arguments" error, because there are too many files in the folder (don't get me started on how stupid this is). So, now I'd like some suggestions on the simplest way to: 1. Touch a single file 2. Specify a folder and touch every JSP in that folder and all its subfolders. A straightforward multi-step process using temporary files and standard shell commands is an acceptable possibility. Simple code for doing it from RPG is also fine. Last place option is a Java program. Joe ============================= William Washington III Njia Systems Incorporated w.washington3@xxxxxxxxxxxxxxx 312-719-0519 =============================
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.