Bong,
I was able to use your method. Here is the final product. It figures out if files are older than 60 days and deletes them if they are (thanks again). Works great:
package geacProcessPackage;
import java.io.*;
final class cleanArchive {
static boolean cleanFiles(File directory...
Hi All,
I am using the following line of code:
String[] children = directory.list();
It seems fine when I used it other places but I am getting an error on compile:
C:\j2sdk1.4.2_11\bin>javac timeoutput.java
timeoutput.java:4: cannot resolve symbol
symbol : class io
location: package java...
Hello All,
I want to purge all log files in a directory that are over 60 days old. Is there a Java class that will tell me how old a file is or perhaps a "created date?" I have been looking and can't find one. Hint I do have the YYYYMMDDHHMM as part of the file's name. Can I turn this into...
So here is what I did:
for p_par in $*; do
echo $p_par
done
It worked great. This was just my test script for a more complicated process where I had to take action on each positional variable. It worked just as easily. Thank you, PHV and Jean Pierre.
Bradley
Hi All,
I have a brain teaser. I am attempting to loop through a number of positional parameters but keep getting caught in an infinite loop.
The input is : $ script_name (p_par_1) ...(p_par_n)
The script I have:
#!/usr/bin/ksh
x=1
while [ -n $`$x` ] ; do #do while x is not null
echo...
Hello All,
I am having trouble with what seems simple. I am trying to change the delimiters in a file using awk. The current delimiter is a tab and I would like to change it to a ":" (colon).
I am on the Korn shell and have tried the following:
awk -F: {print} filename
and also:
awk...
Thanks Jean Pierre. I get a chance to revise the program later this week. I would rather do this correctly and I know that +([0-9]) is the correct test. I will let you know how it goes.
Bradley
Thank you stefan and aigles. I was using Korn so I tried to refine my code as in the aigles example. I can see this should work. But after much trying and frustration I went a differnt route:
if [ $temp -ge 1 -a $temp -lt 100000 ] ; then
echo "The number, $temp is...
Hi All,
I am having a little trouble with a Shell script I am writing. I would like to test input to see if it contains only numerals. I have already checked it for length, between 3 and 8 characters long. Let's say the the variable is called $value, how would I write the if statement?
if [...
no it all depends on the action on form A, based on some
conditional checking on form A I will set the focus to Text1 or text2. Its how my forms are working, if the user selects adding items in form A then I will set the focus to Text1, if the user selects to retrieve an item from database in...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.