Results 1 to 2 of 2
Hi,
Anyone can help me on my script to convert these in SOLARIS Script, these would be work in LINUX.
Code:
## START HERE ###
#!/bin/bash
EMAIL_ADDRESS="myemail@company.com"
DATE=`/bin/date +%m%d%Y`
TIME=`/bin/date ...
- 03-19-2009 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 2
URGENT! Solaris File IF Exist and BYTES Validation
Hi,
Anyone can help me on my script to convert these in SOLARIS Script, these would be work in LINUX.
Any help are highly appreciated, thanks in advance.Code:## START HERE ### #!/bin/bash EMAIL_ADDRESS="myemail@company.com" DATE=`/bin/date +%m%d%Y` TIME=`/bin/date +%H:%M` SUBJECT="The Status was SEND..." ROTATE_FILES="/directory/logs" REAL_FILE="status.log" function rotate_files() { for j in $1;do echo "Loop1" if [ -d $j ] then for i in `ls -a /$j` do if [ $i = $ROTATE_FILES/status.log ] then echo $i FILESIZE=`ls -l $i|awk "{print $5}"` LIMIT=0 if [ $FILESIZE -ne 0 ] then echo "the size is greater" mutt -s "$SUBJECT at $TIME on $DATE" -a "$ROTATE_FILES/status.log" "$EMAIL_ADDRESS" < /dev/null fi fi done fi done } rotate_files "$ROTATE_FILES" ### END HERE ###
RegardsLast edited by devils casper; 03-19-2009 at 09:51 AM. Reason: Added [code]...[/code] tag.
- 03-20-2009 #2Just Joined!
- Join Date
- Mar 2009
- Posts
- 2
Done!
I done it myself...TNX


Reply With Quote