Re: script line not working as its supposed to, but why?
Sharon Kimble writes:
> ++ wc -l
> ++ ls -1 'menu-*'
> ls: cannot access menu-*: No such file or directory
> + '[' 0 -gt 7 ']'
>
I fear that you should either 'cd' to the directory (~/.fluxbox I
suppose) you want to clear before running my code or change it this
way
if [ `ls -1 ~/fluxbox/menu-* | wc -l` -gt 7 ]
then
ls -t ~/fluxbox/menu-* | tail $((7-`ls | wc -l`)) | xargs rm
fi
ls returned an error because it did not find any file matching
"menu-*" in the current directory.
--
/\ ___ Ubuntu: ancient
/___/\_|_|\_|__|___Gian Uberto Lauri_____ African word
//--\| | \| | Integralista GNUslamico meaning "I can
\/ coltivatore diretto di software not install
già sistemista a tempo (altrui) perso... Debian"
Warning: gnome-config-daemon considered more dangerous than GOTO
Reply to: