[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: script line not working as its supposed to, but why?



On Wed, 11 Dec 2013 21:58:19 +1100
Scott Ferguson <scott.ferguson.debian.user@gmail.com> wrote:

> On 11/12/13 21:45, Sharon Kimble wrote:
> > I have this line in a bash script that is not doing what its
> > supposed to - 
> > 'find /home/boudiccas/.fluxbox -type f -mtime +"$num" -name 'menu-*'
> > -delete'
> > where "$num" = 7 and 'menu-*'=menu-20131209-11:05 . Obviously the
> > date and time can be different in each case, so how do I get it so
> > that it deletes the menus if their number is greater than 7 please?
> 
> That's the tricky part. As it stands the "menu" is just a string
> *not* a value. Either convert it into a value or use another method
> to determine which menu to delete (hint: creation date).

But there is no consistency with the creation date, the menu itself is
regenerated whenever I install a new programme, and the old menu is
saved with the suffix of the date and time. This could happen several
times a day, or just once a week, there is no pattern to it. 

Or am I missing something obvious? :)

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.3.2
Registered Linux user 561944

Attachment: signature.asc
Description: PGP signature


Reply to: