Guys, Doing a quick backup of config files (like .bashrc) from within bashrc and I need to find a better way to find the total number of files matching a glob in a directory. Currently I'm using: total=$(ls $budir/bashrc-* | wc -l) to determine how many copies I have in my bashrc.tar.bz2 backup + the new one I just copied to the backup location so I can determine the number to delete to just save the last 3 when I tar it up again. The ls | wc combination works fine, but I don't like the fact that there is a pipe in the middle of it. If there is a cleaner way to do it, let me know. P.S. Yes, I've added an alias too many times by doing "alias xzy='whatever'
~/.bashrc" -- thus the quick backup from within bashrc :p Of course if I would just remember >> I'd be just fine....
-- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org