Mailing List Archive

Support open source code!


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

tlug: bash ?



--------------------------------------------------------
tlug note from Jim Schweizer <schweiz@example.com>
--------------------------------------------------------
Hi all,

I'm trying to learn a little about bash programming to make
cleaning up a lighter job but I've run into a problem.

Purpose: find files by date and rm, cat, cp or whatever.

This works fine:

ls -l | grep -i 'feb 27' | cut -c56- 

for finding todays files, but I want to write a shell script for
it like:

function lsdate {
  date=$1
  ls -l | grep -i "^.\43\}$date" | cut -c56-
}

then call the script like lsdate 'feb 27' but the script isn't
accepting the filename arguments.

I realize this is pretty basic, but what am I doing wrong?

BTW, the new XFMail mentioned in this month's Linux Gazette is
pretty spiffy. No more limits on text in the editor, ispell
works fine with it and it loads much faster. My only complaint
is when you print a hardcopy, it prints the full header and there
doesn't seem to be a way to disable this feature. I also can't
seem to get the font to change in the message viewer (although
it changes fine in the folder viewer, etc) It doesn't appear to
support kanji but it does do 12 sets including Russian.

Anyway, it's a heck of a lot faster than Netscape's mailer.

Thanks,

Jim S.

-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links