The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-25-2007
vgs vgs is offline
Registered User
  
 

Join Date: May 2007
Posts: 10
I have written the below ksh script(in sun solaris) using one old posting but i am getting an error message saying that " ./fileage: not found".

Looks like the fileage is not recognized.
please can any one help.

#!/bin/ksh
AGE=$1
cd c:/temp
for file in $(ls)
do
echo "in the for loop"
if [[ $(( $(./ $file)/60)) -ge $AGE ]]
then
echo $file >>outputfiles.txt
fi
done >outputfiles.txt

final=`wc -l outputfiles.txt|awk '{print $1}'`
if [ $final -ge 1 ]
then
echo $final|mailx -s "Unprocessed Files in blabla" abc.xyz@yahoo.com
else
echo "Everything's OK"
fi