![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Auto copy for files from folder to folder upon instant writing | Bashar | UNIX for Advanced & Expert Users | 2 | 08-21-2008 02:44 PM |
| How to display contents of folder when 'cd' is used | mumashankar | UNIX for Dummies Questions & Answers | 3 | 03-06-2008 07:42 PM |
| display the files in a folder which are older than 1 hour | vgs | UNIX for Dummies Questions & Answers | 3 | 05-25-2007 08:46 PM |
| Logic behind display of .www folder ?? | srinivasan_85 | UNIX for Dummies Questions & Answers | 10 | 01-13-2007 06:41 AM |
| Need to process files created an hour ago | negixx | Shell Programming and Scripting | 9 | 06-15-2005 01:31 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
i am using sun Solaris.
i am trying to write a script which will display files from a particular folder(Directory)(should not include subdirectories) which are 2 hrs(this should be used like a variable so that i can change the time) older. i tried using find command. but find looks in subdirectories also. I don't want to check in subdirectories. files looks like: 12345600000.PDF 32455664647.XLS appriciate your help. |
|
||||
|
use prune option with find
|
| Sponsored Links | ||
|
|