[SunHELP] Shell Script

Edward Chase sunhelp at sunhelp.org
Mon Mar 26 13:11:04 CST 2001


It might do you a world of good for you to pick up a shell scripting book 
or two.  I don't mean to sound cruel or mean, I've just noticed that you've 
asked the group for several scripts.

While not a script, here's what you want to do...

stop service
mv service.log service.log.old
tail -100 service.log.old > service.log
restart service




At 02:17 PM 3/26/2001 +0000, Balaji N wrote:
>Hi everyone
>
>I have a directory which contains *.log files and txt files. I need a
>shell  script which  can clear all lines in *.log files and keeping some
>latest 100 lines . I can put the script as cron job, so that it can
>run in weekly basis. can anyone have?
>
>Thanks in advance
>Balaji

---------------------------------------------------------------
  Edward F. Chase III     |   echase at providence.edu
  Providence College      |   http://www.providence.edu
  Computer Services       |   http://studentweb.providence.edu
  Providence, RI  02918   |




More information about the SunHELP mailing list