old-www/LDP/LG/issue67/lg_mail67.html

1007 lines
36 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.3E.u">
<TITLE>Linux Gazette Mailbag LG #67</TITLE></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<P>
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="../faq/index.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="lg_bytes67.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</p>
<!-- HELP WANTED : Article Ideas SECTION ================================================== -->
<!-- endcut ======================================================= -->
<center>
<H1><A NAME="wanted"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/mailbox.gif">
The Mailbag</A></H1> <BR>
<!-- BEGIN wanted -->
</center>
<P> <hr> <P>
<!-- =================================================================== -->
<center><H3><font color="maroon">HELP WANTED : Article Ideas</font></H3></center>
<P>
<P> Send tech-support questions, answers and article ideas to The Answer Gang
&lt;<A HREF="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</A>&gt;. Other mail (including
questions or comments about the <EM>Gazette</EM> itself) should go to
&lt;<A HREF="mailto:gazette@ssc.com">gazette@ssc.com</A>&gt;. All material
sent to either of these addresses will be considered for publication in the
next issue. <EM>Please send answers to the original querent too, so that s/he
can get the answer without waiting for the next issue.</EM>
<P> Unanswered questions might appear here. Questions with
answers--or answers only--appear in The Answer Gang, 2-Cent Tips, or here,
depending on their content. There is no guarantee that questions will
<em>ever</em> be answered, especially if not related to Linux.
<P> <STRONG>Before asking a question, please check the
<A HREF=../faq/index.html><I>Linux Gazette</I> FAQ</A> to see if it has been
answered there.</STRONG>
<P> <HR> <P>
<!--====================================================================-->
<!-- BEGIN HELP WANTED : Article Ideas -->
<UL>
<!-- index_text begins -->
<li><A HREF="#wanted/1"
><strong>ip_always_defrag missing from kernel 2.4?</strong></a>
<li><A HREF="#wanted/2"
><strong>'Spanking New' Distribution ships with 'development' compiler</strong></a>
<li><A HREF="#wanted/3"
><strong>Printer memory overflows</strong></a>
<li><A HREF="#wanted/4"
><strong>What happened to e2compr?</strong></a>
<li><A HREF="#wanted/5"
><strong>Linux fashion</strong></a>
<li><A HREF="#wanted/6"
><strong>IRC channels for IPChains</strong></a>
<li><A HREF="#wanted/7"
><strong>Tape Backup</strong></a>
<li><A HREF="#wanted/8"
></a>Article idea --or--
<br><A HREF="#wanted/8"
><strong>MySQL tips and tricks</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">ip_always_defrag missing from kernel 2.4?</FONT></H3>
Thu, 10 May 2001 11:04:18 -0500
<BR>James Garrison (<a href="mailto:linux-questions-only@ssc.com?cc=jhg@athensgroup.com">jhg from athensgroup.com</a>)
<!-- sig -->
<P>
In its place there appear to be three new parameters:
</P>
<BLOCKQuote><ccde>
ipfrag_high_thresh - INTEGER
</code></BLOCKQuote>
<P>
Maximum memory used to reassemble IP fragments. When
<tt>ipfrag_high_thresh</tt> bytes of memory is allocated for this
purpose,
the fragment handler will toss packets until <tt>ipfrag_low_thresh</tt>
is reached.
</P>
<Pre>
ipfrag_low_thresh - INTEGER
See ipfrag_high_thresh
ipfrag_time - INTEGER
Time in seconds to keep an IP fragment in memory.
</Pre>
<P>
Any idea what are 'reasonable' settings?
</P>
<P>
What settings will mimic, as closely as possible, the behavior of
<tt>ip_always_defrag</tt>?
</P>
<P>
--
James Garrison
</P>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted/2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">'Spanking New' Distribution ships with 'development' compiler</FONT></H3>
Mon, 21 May 2001 21:01:52 -0400
<BR>Marc Doughty (<a href="mailto:linux-questions-only@ssc.com?cc=mdoughty@etal.uri.edu">mdoughty from etal.uri.edu</a>)
<!-- sig -->
<P>
Hello TAG-Team,
</P>
<P>
I just installed Mandrake 8.0. I intend to use gcc (the compiler) quite a
bit to recompile lots of software. Mandrake 8.0 ships with a development
version of gcc (2.96) but I really want to stick with 2.95.x for
stability/portability. How can I remove the development-gcc and put an
older version in without breaking the system. I know there must be a way to
do this via RPM, but it eludes me and I was seriously frightened to rebuild
from an unmanaged source tarball.
</P>
<P>
-Marc Doughty
</P>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Printer memory overflows</FONT></H3>
Sun, 20 May 2001 12:46:11 -0400
<BR>Jonathan Markevich (<a href="mailto:linux-questions-only@ssc.com?cc=jmarkevich@mad.scientist.com">jmarkevich from mad.scientist.com</a>)
<!-- sig -->
<P>
I just got an older laser printer and it works very well with a HP LJ III
printcap setting, except it has only 1 MB of RAM. This works well until I
try to print a PDF, then it runs out of printer memory about 7/8 of the way
through the page.
</P>
<P>
Is there some way to tell ghostscript/lpd to go easy on the thing? I was able
to print them fine on my inkjet, and it definitely doesn't have 1 MB of
memory installed...
</P>
<P>
Oh yes, the same .PDF prints fine on the Evil(tm) Operating System.
</P>
<P>
Thanks.
</P>
<P>
--
Jonathan Markevich
</P>
<!-- sig -->
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted/4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">What happened to e2compr?</FONT></H3>
Sun, 20 May 2001 12:23:55 -0400
<BR>Pierre Abbat (<a href="mailto:linux-questions-only@ssc.com?cc=phma@oltronics.net">phma from oltronics.net</a>)
<!-- sig -->
<P>
I run Linux 2.2.14 on a laptop with a by now small hard drive. To put some huge
files (such as graphics in the middle of editing) on it, I installed the
e2compr patch to the kernel. I'd like to upgrade to 2.4, but the patch doesn't
seem to be available for 2.4. Anybody know what happened to it?
</P>
<P>
phma
</P>
<!-- sig -->
<p><em>There's at least one new compressed filesystem in the new kernels,
but I'm not sure that the one I'm thinking of is realy ext2 compatible.
Still, you might not need that. There's a curious new style of ramdisk
available too. Anyone who knows more is welcome to chime in ...
-- Heather</em></p>
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Linux fashion</FONT></H3>
Mon, 21 May 2001 10:39:29 +0200
<BR>Erez Avraham (<a href="mailto:linux-questions-only@ssc.com?cc=ereza@meetu.com">ereza from meetu.com</a>)
<!-- sig -->
<P>
Greetings
</P>
<P>
I'm reading the gazette for a wile now, and never found an answer to my
simple question
Where can I found Baby's clothes related to Linux? With Linux logo or
something.
I want my baby to be cool (and to use Linux) .....
</P>
<P>
thanks
<br>Erez Avraham
</P>
<!-- sig -->
<p><em>It looks like The Emporium (a UK company) sells child size sweatshirts
but I don't know what sizes are good for babies. Comments welcome. If you
are a commercial entity which has 'em, let us know, and we'll put you in
News Bytes. -- Heather</em></p>
<!-- end 5 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted/6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">IRC channels for IPChains</FONT></H3>
Mon, 30 Apr 2001 15:35:06 -0700
<BR>Bettle, Roy (<a href="mailto:linux-questions-only@ssc.com?cc=RBettle@lbfc.com">RBettle from lbfc.com</a>)
<!-- sig -->
<P>
One more quickie: do you know of any IRC channels where I can get some
IPChains questions answered? I'm trying to put in a firewall for a client
using a script that has worked very well for me for several years (used to
be IPMasq, but has been modified for IPChains) but just dies now and for the
life of me I can't figure out why.
</P>
<P>
The only difference in this case that I can see is that the DSL line it sits
behind is running Ethernet bridging (PacBell DSL) over an Alcatel modem and
the script has been running behind a <A HREF="mailto:Cox@Home"
>Cox@Home</A> cable modem (no bridging); but
why is that such a "deal-killer"?
</P>
<P>
Anyway, thanks again!
</P>
<P>
RAB
</P>
<P>
Roy Bettle
</P>
<!-- end 6 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted/7"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Tape Backup</FONT></H3>
Sat, 19 May 2001 13:25:32 +0800
<BR>Desmond (<a href="mailto:linux-questions-only@ssc.com?cc=desmond@kikuze.com">desmond from kikuze.com</a>)
<!-- sig -->
<P>
Hi Sir,
</P>
<P>
Recently,in the pipeline of converting my NT server to a Redhat 7.1 Linux
Server with Samba on it. But the problem is I'm using a a HP SureStoreDAT 40
tape Drive. And there is nowhere I can find the driver for this
device(including the HP and Redhat website). I really hope that I can
realise my dream of setting up 2 Linux server(with UPS and backup tape
driver on) at my place. I don't want to scrap the whole project halfway.
Does you knows where I can get the above driver or a generic driver well do?
Or is there any recommendations on a almost similar tape drive that is well
supported with Redhat? If I can't succeed then I 'll have to go to
Windows2000 with all those expensive licenses. Thanks
<br>warmest regards,
</P>
<P>
Desmond Lim
</P>
<!-- end 7 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Article idea</FONT></H3>
Mon, 14 May 2001 05:56:21 -0400
<BR>Gerspacher, Travis (<a href="mailto:linux-questions-only@ssc.com?cc=GerspacherTr@bfusa.com">GerspacherTr from bfusa.com</a>)
<!-- sig -->
<!-- ::
MySQL tips and tricks
~~~~~~~~~~~~~~~~~~~~~
:: -->
<P><em>Yes, Gentle Readers, this is also in TAG this month, but folks
looking for article ideas are encouraged to take this and
run with it. For that matter, we have a PostgresSQL
related article this month (<a href="nielsen.html">nielsen.html</a>)
but it would be fun to have an article comparing PostgresSQL to
MySQL. -- Heather</em>
</P>
<P><STRONG>
I would love to see an article about making sense of MySQL.Perhaps
some basic commands, and how to do something useful with it.
</STRONG></P>
<P>
Here are some basic commands. As far as "something useful", what would
you consider useful?
</P>
<P><STRONG>
I have found a
lot of articles either lack basic usage and administration or it it fails to
show how to put it all together and have somehing useful come out of it.
</STRONG></P>
<P>
The 'mysql' command is your friend. You can practice entering commands
with it, run ad-hoc queries, build and modify your tables, and test
your ideas before coding them into a program. Let's look at one of the
sample tables that come with MySQL in the 'test' database. First
we'll see the names of the tables, then look at the structure of the
TEAM table, then count how many records it contains, then display a few
fields.
</P>
<blockquote><pre>$ mysql test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1325 to server version: 3.23.35-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer
mysql&gt; show tables;
+------------------+
| Tables_in_test |
+------------------+
| COLORS |
| TEAM |
+------------------+
2 rows in set (0.00 sec)
mysql&gt; describe TEAM;
+------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------+------+-----+---------+----------------+
| MEMBER_ID | int(11) | | PRI | NULL | auto_increment |
| FIRST_NAME | varchar(32) | | | | |
| LAST_NAME | varchar(32) | | | | |
| REMARK | varchar(64) | | | | |
| FAV_COLOR | varchar(32) | | MUL | | |
| LAST_DATE | timestamp(14) | YES | MUL | NULL | |
| OPEN_DATE | timestamp(14) | YES | MUL | NULL | |
+------------+---------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)
mysql&gt; select count(*) from TEAM;
+----------+
| count(*) |
+----------+
| 4 |
+----------+
1 row in set (0.00 sec)
mysql&gt; select MEMBER_ID, REMARK, LAST_DATE from TEAM;
+-----------+-----------------+----------------+
| MEMBER_ID | REMARK | LAST_DATE |
+-----------+-----------------+----------------+
| 1 | Techno Needy | 20000508105403 |
| 2 | Meticulous Nick | 20000508105403 |
| 3 | The Data Diva | 20000508105403 |
| 4 | The Logic Bunny | 20000508105403 |
+-----------+-----------------+----------------+
4 rows in set (0.01 sec)
</Pre></Blockquote>
<p>
Say we've forgotten the full name of that Diva person:
</p>
<Blockquote><Pre>
mysql&gt; select MEMBER_ID, FIRST_NAME, LAST_NAME, REMARK
-&gt; from TEAM
-&gt; where REMARK LIKE "%Diva%";
+-----------+------------+-----------+---------------+
| MEMBER_ID | FIRST_NAME | LAST_NAME | REMARK |
+-----------+------------+-----------+---------------+
| 3 | Brittney | McChristy | The Data Diva |
+-----------+------------+-----------+---------------+
1 row in set (0.01 sec)
</Pre></Blockquote>
<p>
What if Brittney McChristy changes her last name to Spears?
</p>
<Blockquote><Pre>
mysql&gt; update TEAM set LAST_NAME='Spears' WHERE MEMBER_ID=3;
Query OK, 1 row affected (0.01 sec)
mysql&gt; select MEMBER_ID, FIRST_NAME, LAST_NAME, LAST_DATE from TEAM
-&gt; where MEMBER_ID=3;
+-----------+------------+-----------+----------------+
| MEMBER_ID | FIRST_NAME | LAST_NAME | LAST_DATE |
+-----------+------------+-----------+----------------+
| 3 | Brittney | Spears | 20010515134528 |
+-----------+------------+-----------+----------------+
1 row in set (0.00 sec)
</Pre></Blockquote>
<p>
Since LAST_DATE is the first TIMESTAMP field in the table, it's
automatically reset to the current time whenever you make a change.
</p>
<p>
Now let's look at all the players whose favorite color is blue, listing
the most recently-changed one first.
</p>
<Blockquote><Pre>
mysql&gt; select MEMBER_ID, FIRST_NAME, LAST_NAME, FAV_COLOR, LAST_DATE from TEAM
-&gt; where FAV_COLOR = 'blue'
-&gt; order by LAST_DATE desc;
+-----------+------------+-----------+-----------+----------------+
| MEMBER_ID | FIRST_NAME | LAST_NAME | FAV_COLOR | LAST_DATE |
+-----------+------------+-----------+-----------+----------------+
| 3 | Brittney | Spears | blue | 20010515134528 |
| 2 | Nick | Borders | blue | 20000508105403 |
+-----------+------------+-----------+-----------+----------------+
2 rows in set (0.00 sec)
</Pre></Blockquote>
<p>
Now let's create a table TEAM2 with a similar structure as TEAM.
</p>
<Blockquote><Pre>
mysql&gt; create table TEAM2 (
-&gt; MEMBER_ID int(11) not null auto_increment primary key,
-&gt; FIRST_NAME varchar(32) not null,
-&gt; LAST_NAME varchar(32) not null,
-&gt; REMARK varchar(64) not null,
-&gt; FAV_COLOR varchar(32) not null,
-&gt; LAST_DATE timestamp,
-&gt; OPEN_DATE timestamp);
Query OK, 0 rows affected (0.01 sec)
mysql&gt; describe TEAM2;
+------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+---------------+------+-----+---------+----------------+
| MEMBER_ID | int(11) | | PRI | NULL | auto_increment |
| FIRST_NAME | varchar(32) | | | | |
| LAST_NAME | varchar(32) | | | | |
| REMARK | varchar(64) | | | | |
| FAV_COLOR | varchar(32) | | | | |
| LAST_DATE | timestamp(14) | YES | | NULL | |
| OPEN_DATE | timestamp(14) | YES | | NULL | |
+------------+---------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)
</Pre></Blockquote>
<p>
Compare this with the TEAM decription above. They are identical (except
for the multiple index we didn't create because this is a "simple"
example).
</p>
<p>
Now, say you want to do a query in Python:
</p>
<Blockquote><Pre>
$ python
Python 1.6 (#1, Sep 5 2000, 17:46:48) [GCC 2.7.2.3] on linux2
Copyright (c) 1995-2000 Corporation for National Research Initiatives.
All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.
&gt;&gt;&gt; import MySQLdb
&gt;&gt;&gt; conn = MySQLdb.connect(host='localhost', user='me', passwd='mypw', db='test')
&gt;&gt;&gt; c = conn.cursor()
&gt;&gt;&gt; c.execute("select MEMBER_ID, FIRST_NAME, LAST_NAME from TEAM")
4L
&gt;&gt;&gt; records = c.fetchall()
&gt;&gt;&gt; import pprint
&gt;&gt;&gt; pprint.pprint(records)
((1L, 'Brad', 'Stec'),
(2L, 'Nick', 'Borders'),
(3L, 'Brittney', 'Spears'),
(4L, 'Fuzzy', 'Logic'))
</Pre></Blockquote>
<p>
Another approach is to have Python or a shell script write the SQL
commands to a file and then run 'mysql' with its standard input coming
from the file. Or in a shell script, pipe the command into mysql:
</p>
<Blockquote><Pre>
$ echo "select REMARK from TEAM" | mysql -t test
+-----------------+
| REMARK |
+-----------------+
| Techno Needy |
| Meticulous Nick |
| The Data Diva |
| The Logic Bunny |
+-----------------+
</Pre></Blockquote>
<p>
(The -t option tells MySQL to draw the table decorations even though
it's running in batch mode. Add your MySQL username and password if requred.)
</p>
<p>
'mysqldump' prints a set of SQL commands which can recreate a table.
This provides a simple way to backup and restore:
</p>
<Blockquote><Pre>
$ mysqldump --opt -u Username -pPassword test TEAM &gt;/backups/team.sql
$ mysql -u Username -pPassword test &lt;/backups/team.sql
</Pre></Blockquote>
<p>
This can be used for system backups, or for ad-hoc backups while you're
designing an application or doing complex edits. (And it saves your butt
if you accidentally forget the WHERE clause in an UPDATE statement and
end up changing all records instead of just one!)
</p>
<p>
You can also do system backups by rsyncing or tarring the /var/lib/mysql/
directory. However, you run the risk that a table may be in the middle
of an update. MySQL does have a command "LOCK TABLES the_table READ",
but interspersing it with backup commands in Python/Perl/whatever is less
convenient than mysqldump, and trying to do it in a shell script without
running mysql as a coprocess is pretty difficult.
</p>
<p>
The only other maintenance operation is creating users and assigning
access privileges. Study "GRANT and REVOKE syntax" (section 7.25) in
the MySQL reference manual. I always have to reread this whenever I
add a database. Generally you want a command like:
</p>
<Blockquote><Pre>
mysql&gt; grant SELECT, INSERT, DELETE, UPDATE on test.TEAM to somebody
-&gt; identified by 'her_password';
Query OK, 0 rows affected (0.03 sec)
</Pre></Blockquote>
<P>
This will allow "somebody" to view and modify records but not to change
the table structure. (I always alter tables as the MySQL root user.)
To allow viewing and modifying of all current and future tables in
datbase 'test', use "on test.*". To allow certain users access without
a password, omit the "identified by 'her_password'" portion. To limit
access according to the client's hostname, use 'to somebody@"%.mysite.com"'.
</p>
<p>
Remember that MySQL usernames have no relationship to login usernames.
</p>
<p>
To join multiple tables (MySQL is a "relational" DBMS after all), see
"SELECT syntax" (section 7.11). Actually, all of chapter 7 is good to
have around for reference. The MySQL manual is at
http://www.mysql.com/doc/
</p>
<p>
--
Mike Orr
</p>
<!-- =================================================================== -->
<a name="mailbag"></a>
<P> <hr> <P>
<center><H3><font color="maroon">GENERAL MAIL</font></H3></center>
<P> <HR> <P>
<!--====================================================================-->
<!-- BEGIN GENERAL MAIL -->
<UL>
<!-- index_text begins -->
<li><A HREF="#mailbag/1"
><strong>bash string manipulating</strong></a>
<li><A HREF="#mailbag/2"
><strong>Linux in Africa</strong></a>
<li><A HREF="#mailbag/3"
><strong>Your reply</strong></a>
<li><A HREF="#mailbag/4"
><strong>just so you know...</strong></a>
<li><A HREF="#mailbag/5"
><strong>Submission: A tired Newbie attempts Linux <again></strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">bash string manipulating</FONT></H3>
Thu, 10 May 2001 23:48:54 +0100
<BR>Peter Flynn (<a href="mailto:gazette@ssc.com">peter from silmaril.ie</a>)
<!-- sig -->
<P>
On Thu, 10 May 2001, you wrote:
</P>
<P><STRONG>
I realize that this question was quite old, but I just came
across it while cleaning out my inbox. Here's a couple of
quick suggestions:
</STRONG></P>
<P><BLOCKQuote>
Thanks very much, very useful.
</BLOCKQuote></P>
<P><STRONG>
First: don't use this sort of "psuedo array." If you want an array
(perhaps an associative array, what PERL calls a "hash") then use an
array. Korn shell supports associative arrays. Bash doesn't. With
other shells, you'll have to check.
</STRONG></P>
<P>
Not easy when you have to work with what is given
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
Actually I ditched it all and rewrote the app in XML and XSLT
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
</P>
<P>
///Peter
</P>
<!-- sig -->
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag/2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Linux in Africa</FONT></H3>
Sun, 20 May 2001 17:02:43 +0200
<BR>Martin Skj&ouml;ldebrand (<a href="mailto:gazette@ssc.com&cc=chimbis@bahnhof.se">chimbis from bahnhof.se</a>)
<!-- sig -->
<P>
<em>Martin is one of our authors.</em>
</P>
<P>
Hi,
</P>
<P>
This is to inform the world of an idea we are playing with.
I work for an 3rd world aid organisation and recently returned home from a
trip to Dar es Salaam, Tanzania. One of the ideas I brought with me back was
the wish of some of our member organisations to set up some kind of computer
training in "rural" Tanzania.
</P>
<P>
The interest of computers, and computer aided training is great, the means of
buying computers non-existant. So, the idea is to set up training centres
using "second hand" computers. My idea is to have this equiped with Linux and
Star Office which will be ideal in terms of priceing and stability - if not
perhaps in trained staff.
</P>
<P>
All of this is of course only in a very early stage of planning, but we hope
to go ahead with the project at the latest during next year. If anyone else
has any experiences of similar projects I am interested in hearing from you!
</P>
<P>
Regards,
</P>
<P>
Martin Skj&ouml;ldebrand
CTO, Forum Syd
The Swedish NGO Centre for Development Co-operation.
</P>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Your reply</FONT></H3>
Wed, 16 May 2001 12:59:46 +1000
<BR>Peter Parkes (<a href="mailto:gazette@ssc.com">ptpi from yahoo.com</a>)
<!-- sig -->
<P>
Thank you for your reply...I know I answered it already but at that point I
had only seen what was written on the TAG site (board/whatever) which was
very brief. Your email to me had not arrived at that point, so I didn't get
much of a message from you -as you may? have gathered from my answer to it.
Sorry about my email settings...I was sending from a machine which was
only just set up and running on defaults which I hadn't looked at. (Or
maybe it was the setup of the message board....perhaps I pressed a "include
html tags" button or something , not thinking. I really can't remember).
I'll pay more attention to it in future.
As for your answer, thank you very much. It will help me in the future, I'm
sure. I don't really know anyone who I can talk to about this sort of stuff
(computers) so reading what I can find and filing away little tips like
that is pretty much my sole reference source when things f up. I only found
out that TAG even existed on the weekend, so maybe I'll write again
sometime. A really useful site.
<br>Thanks again and keep up the good work helping people.
<br>All the best, Peter.
</P>
<P><STRONG>
On Sun, May 06, 2001 at 06:12:32AM +0100, Peter P wrote:
</STRONG></P>
<P><STRONG><FONT COLOR="#000066"><EM><BLOCKQuote>
Content-Type: text/html; charset=iso-8859-1
</BLOCKQuote></EM></FONT></STRONG></P>
<P><STRONG>
Don't do that, please. Sending e-mail in <EM>any</EM> format other than plain
text lowers the chances of your question being answered. It's impolite
... "Bad signature" is, of course, a software-dependent error, but it seems
to be a pretty standardized one: what it usually means is that something
scribbled over the last couple of bytes of the first sector on the drive. ...
</STRONG></P>
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag/4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">just so you know...</FONT></H3>
Thu, 10 May 2001 20:54:33 -0400
<BR>Llewelyn Preece (<a href="mailto:gazette@ssc.com">Preece from rdacustomsoftware.com</a>)
<!-- sig -->
<P>
That others have been helped by having this out there. thanks!
</P>
<!-- sig -->
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Submission: A tired Newbie attempts Linux <again></FONT></H3>
Tue, 15 May 2001 16:20:45 -0400
<BR>Paul Bussiere (<a href="mailto:gazette@ssc.com">webmaster from checksix.net</a>)
<!-- sig -->
<P>
Of all the articles I have read on how wonderful Linux is, seldom have I
seen any that [cynically] document how the average Windows user can go from
mouse-clicking dweeb to Linux junkie. Perhaps such an article does not
exist? Or, maybe those that made the jump to Linux have forgotten the hoops
us Win-dweebs are still facing.
</P>
<P>
A few years back, when this giant Linux wave began to crest, I was working
for a local Electronics Boutique (EB) store for a few hours a week.
Microsoft was in the news almost daily, and as the lawsuit against it
grinded close to a close, anything Linux faired <EM>very</EM> well in the stock
market and in the software reviews, it seemed. Heck, even EB was begining
to stock games for Linux, maybe this is the little OS that can make it after
all. So, like others, I took the dip into Linux, bringing home a copy of
RedHat and pretty much every version since.
</P>
<P>
&lt; Buying Linux &gt;
</P>
<P>
Perhaps the first thing to be forgotten about Linux versus Windows was "Hey,
Linux is FREE". What someone forgot to tell the rest of the world was that
its one helluva download that doesn't always like to finish. And, up here
in the NorthEast (Maine specifically), broadband wasnt here, so your idea of
a good download was a 5.3k connect on the 56k modem! So, off to the store
and buy a copy for $30 or so bucks. Then, not more than 3 months later,
another build is out! Off we go and spend another $30 bucks....and repeat
this process a few more times to our current build. Hmmm, well, its cost me
more than all my Microsoft updates, and the Windows Update button sure is
vastly easier than the Linux equivalent(s).
</P>
<P>
So, the claim of FREE FREE FREE really isn't so....I've found other places
that you can buy a CD copy cheaper but still, some money negates the FREE.
</P>
<p><em>Many free software notables would stand firmly on the point that
"free" in "free software" is not about money, it's about your ability to
improve, debug, or even use these applications after their original vendor
gives up on them, disappears, or even simply turns to other things.</em></p>
<p><dl><dt><em>The Free Software Foundation, home of the GNU project: </em>
<dd><a href="http://www.fsf.org/">http://www.fsf.org/</a>
<dt><em>calls this concept </em>
<dd>"<a href="http://www.gnu.org/philosophy/free-sw.html"
>free as in speech, not as in beer.</a>"</dl>
</p>
<p><em>On the flip side(s) of this coin (these dice?), there are some who
say "some work negates the FREE" ... such as your note below ... and those
for whom a "free download" (which is <b>certainly</b> available for most
Linux variants) is really quite expensive. Thus the appearance and eventual
success of companies pre-loading Linux. - Heather</em></p>
<P>
&lt; Install...I dare you...&gt;
</P>
<P>
Linux this, Linux that...that's all we've heard. Microsoft is bad (say
using the Napsater Baaad sound effect from cartoon portraying Lars Ulrich).
So now we give it the go, and guess what? The Linux operating system that w
anted so much to be different from Windows looks JUST LIKE IT. Now while I
will concede it IS easy to jump into for a user like me, all the books I had
seemed to point to the beauty of working in the shell.
</P>
<P>
And another favorite of mine, something I can't understand at all. Why
doesn't Linux do the equivalent of a DOS PATH command? Newbie Me is trying
to shutdown my system and I, armed with book, type "shutdown -h now" and am
told 'command not found'. But wait, my book says...etc etc....and of
course, I now know you have to wander into sbin to make things happen. Why
such commands aren't pathed like DOS is beyond me....perhaps that's another
HowTo that has eluded me.
</P>
<P>
&lt;...and the adventure continues...&gt;
</P>
<P>
And now, two years later, I'm pleased to inform you that I have three Linux
machines on my network, two are DNS servers and the other acts as my TUCOWS
mirror. The DNS Servers work great....their version of BIND was flawed and
five days into service, they were hacked into. Its just not fair, is it?
But, my local Linux Guru solved the problem with a newer version of BIND and
he's been watching over the machines to date. While I am still trying to
learn more, its a slow process for a WinDweeb. While others wait for their
ship to come in, I'm hunting for that perfect HowTo to guide me into the
halls of Linux Guru-Land.
</P>
<P>
Paul Bussiere
</P>
<!-- sig -->
<p><em>While Paul later noted that he meant this "tongue in cheek" ...
meanwhile, The Answer Gang answered him (see
<a href="lg_answer67.html">this month's TAG</a>).
Still, <em>Linux Gazette</em> will cheerfully
publish articles aiding the true Newbie have a little more fun
with Linux. If you have tiny picce of his
"WinDweeb-to-LinuxGuru-HOWTO" waiting in you, check out our
<a href="../faq/index.html#author">author guidelines</a>, and then
let us know! -- Heather</em></p>
<!-- end 5 -->
<!-- =================================================================== -->
<a name="gaz"></a>
<P> <hr> <P>
<center><H3><font color="maroon">GAZETTE MATTERS</font></H3></center>
<P> <HR> <P>
<!--====================================================================-->
<!-- BEGIN GAZETTE MATTERS -->
<UL>
<!-- index_text begins -->
<li><A HREF="#gaz/1"
><strong>GIF -> PNG</strong></a>
<li><A HREF="#gaz/2"
><strong>HelpDex is alive again!</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">GIF -> PNG</FONT></H3>
Fri, 25 May 2001 10:41:10 -0700
<BR>Mike Orr (<a href="mailto:gazette@ssc.com"><em>LG</em> Editor</a>)
<P><BLOCKQuote>
Soon, all GIF images in the back issues of LG will be converted to
PNG or JPG format. If you have a graphical browser that doesn't display
PNG images properly (like the ones in <A HREF="adam.html">The Weekend
Mechanic</A> article), speak up now.
</BLOCKQuote></P>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz/2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">HelpDex is alive again!</FONT></H3>
Tue, 1 May 2001 12:04:09 +1000
<BR>Shane Collinge (<a href="mailto:gazette@ssc.com">HelpDex</a>)
<P>
Hi all,
</P>
<P>
I'll try to get right to the point. It's been two months
since HelpDex finished up on LinuxToday.com. Since then,
strips have only been appearing on www.LinuxGazette.com but
nowhere else. A huge thanks to Mike from LG for this.
</P>
<P><dl><dt>Shane's own site
<dd><A HREF="http://www.shanecollinge.com/Linux"
>http://www.shanecollinge.com/Linux</A>
<br>(Please ignore the popups, I've tried to minimize them but
it's a free server)
</dl></P>
<P><dl><dt>The HelpDex column this issue [with his complete letter -- Heather]
<dd><A HREF="collinge.html"
>collinge.html</A>
</dl></P>
<p>
Can you spread the word for me
please, the more I know I'm wanted the more likely I am to
not be lazy
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</P>
<P>
Oh, and there's also plenty of cool reading around. Check
out Sir JH Flakey (<A HREF="http://www.core.org.au/cartoons.php"
>http://www.core.org.au/cartoons.php</A>) and
of course, ANY book that comes out of O'Reilly
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</P>
<P>
Shane
<!-- end 2 -->
<!--startcut ======================================================= -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2001
<BR>Published in issue 67 of <I>Linux Gazette</I> June 2001</H5>
<H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
</BODY></HTML>
<!--endcut ========================================================= -->