[wellylug] simple super basic bash question

Enkidu enkidu at cliffp.com
Tue Dec 21 19:10:02 NZDT 2004


On Tue, 21 Dec 2004 17:00:34 +1300, you wrote:

>On Mon, 20 Dec 2004 16:57:06 -0800 (PST), Brent Wood wrote:
>> 
>> --- Mark Signal <mark at databackup.co.nz> wrote:
>> 
>> > I had never heard of paste
>> 
>> If you do lots of shell scripting & don't use perl there are lots of little
>> text processing/formatting commands available. Good luck finding them though
>> :-(
>> 
>> tr, sed, cat, cut, paste, merge, grep & awk at least...
>> 
>
>If you think of cut as 'select', grep/sed as 'where', join as 'join',
>you've got a relational database from bash.  It does actually work
>too, for very simple problems.
>
[reluctant snip of some good stuff]

Or you could go the perl route and use the DBI package to make a flat
file look like a database. Then a switch to a real database is a one
line change (um, almost).

Writing databases in shell is like teaching an elephant to tap dance -
interesting if you can do it, but no practical use. Mind you, perl is
not really an enormous lot better, I suppose, though there's a lot of
perl supporting a lot of databases on a lot of servers around the
world.

Cheers,

Cliff
-- 

The National Party manifesto can be viewed here:

http://www.labour.org.nz/policy/index.html




More information about the wellylug mailing list