Search Results

Search: Posts Made By: kayarsenal
5,228
Posted By kayarsenal
Commands not found.
I executed my script and it says not found.

#! /bin/ksh
trymonitor.sh[21]: rm: not found.
+ sleep 15
trymonitor.sh[22]: sleep: not found.
trymonitor.sh[14]: awk: not found....
11,527
Posted By kayarsenal
followup
Hi,
I ran the scriipt but got these errors. I checked the ksh path and its in bin/ksh and usr/bin/ksh.

sh -x trymonitor.sh
+ 0< filepathinput.txt
+ read AGE PATH DELAY
+ cd /A/B/C/
+ 1>...
11,527
Posted By kayarsenal
find files older than 30mins,count and send mail
Hi all,

I wrote this script to find files older than time parameter, count the number of files, and send an email to me that some files are in a particular folder. For the particular path, the...
5,519
Posted By kayarsenal
Kermit script
Hi,
How can I read the second line in kermit?

fread reads line in kermit.

Thank you
4,972
Posted By kayarsenal
followup
Hi All,
I think I asked the question wrongly. The point is, the script deletes all the file in the path where I am running it which it shouldnt as the path is not the text file(xxx.txt) where it...
4,972
Posted By kayarsenal
followup
How do u mean run "touch"?

Thanks
4,972
Posted By kayarsenal
Script removes itself
I have a script that reads from a file and deletes all files in tha path specified in the file.The problem,however, is the script also deletes itself from the home directory where I run it :-(
...
7,325
Posted By kayarsenal
followup
I did. The echo outputs 2006 07 14 which looks fine. Now I intend to list only files created on this date.No more. In order to touch, I appened 0001 and 2359 to this. But when I use find newer...
5,831
Posted By kayarsenal
followup
Why would it necessary to end at the end?Opinions welcome :-) I think you should look at it from here:

#!/bin/ksh

BIN=/interface/Gunner
cd $BIN
sysMon=`date +%m`
sysDay=`date +%d`...
7,325
Posted By kayarsenal
followup
Hi everyone that contributed to my problems :-)

This is the part of the script:

#!/bin/ksh

BIN=/interface/gunner

cd $BIN
sysMon=`date +%m`
sysDay=`date +%d`
sysYear=`date +%Y`...
7,325
Posted By kayarsenal
followup
Thanks alot.It works :-)
5,831
Posted By kayarsenal
followup
$Today is just getting the date of the file. Dont bother about that for now. I think the point is to look,if the file to be removed is present in the path of files to be archived.


The path looks...
2,343
Posted By kayarsenal
followup
Thanks a lot Pade.I will try the code now.I think it should work
2,343
Posted By kayarsenal
followup
Hi Pade,
You mean I should edit the datecalc script? Where exactly to edit to have the YYYYMMDD output? Thank you
2,343
Posted By kayarsenal
Question about Paderabo date script
The date outputs the difference in this format YYYYMD. I think it would be better to have the output as YYYYMMDD. Im having problem processing the format.

Thank you
7,325
Posted By kayarsenal
followup
My script is almost done.The only problem now is Paderabo's script outputs the diff is this format YYYYMD (200693) however I want it to output as 20060903.
7,325
Posted By kayarsenal
followup
Hi,

I added this to my script, but got bad conversion message.I think it could be bcos of the 2006821 output instead of 20060821.

sysMon=`date +%m`
sysDay=`date +%d`
sysYear=`date +%Y`...
7,325
Posted By kayarsenal
followup
Thanks Dhruva,
I will try this.But why is the output just 8 and not 08?This could cause a problem in my final script.I will find out.

Thanks a lot.
7,325
Posted By kayarsenal
followup
Hi Dhruva,
One more point please, the approach you mentioned, it lists all the file newer than the touched date.However,I want only files that are 14days old i.e files that were created btw Aug 21...
7,325
Posted By kayarsenal
followup
Is there a way to know the exact date 14days ago? And have it in this format

YYYYMMDD.

I want to store this date in a variable, then touch it.

Example today is Sep 4th 20060904, 14days ago...
7,325
Posted By kayarsenal
followup
Perfect!

Thanks a lot
7,325
Posted By kayarsenal
find command
Hi All,
I have a problem with using the find command.In my file structure,I need to find files that are exactly 14days old to execute an archive script.I used the "find . -mtime 14" command which...
5,831
Posted By kayarsenal
Confirm before delete.
I have a script that archive files then delete.How do Its working fine,however,before I perform the delete operation,I want to verify that indeed the FILE is in the path of folder I want to archive....
2,401
Posted By kayarsenal
followup
I have for there instead of the while. Now I fixed it. The find . -mtime should come after done NOT before.
2,401
Posted By kayarsenal
Whats wrong with this script?
Hi all,
#!/bin/ksh

BIN=/interface/Gunner

age=$1

directory="$2"

[ "$directory" = "" ] && directory=.

cd "$directory" || exit 1

from=`$BIN/today -$age`
cd $BIN
for i in `cat...
Showing results 1 to 25 of 48

 
All times are GMT -4. The time now is 10:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy