Linux-Misc Digest #818, Volume #23               Sun, 12 Mar 00 02:13:02 EST

Contents:
  Re: Redirection in bash... ([EMAIL PROTECTED])
  Re: How to re-create a boot disk (Tony Wiegand)
  Re: No sound with KDE desktop (Len Philpot)
  Re: C++ in Linux (Benoit Goudreault-Emond)
  test only (Jeff Evans)
  Re: Redirection in bash... (John Doe)
  Re: Goofy apache "bug" (Andrew J. Perrin)
  Re: New to linux - need firewall/nat (John Doe)
  Can't logout of Gnome (Jordan Hiller)
  Re: Do you hate vi?  vi or vim?  Deathmatch! ("Adam C. Emerson")
  VooDoo3 corrupts display (Jason Breitweiser)
  Re: Can't logout of Gnome (Luke)
  Re: Redirection in bash... (Floyd Davidson)
  Re: tar and unwanted ownership ("David ..")
  help with TAR (Luke)
  Re: Can't logout of Gnome (Jordan Hiller)
  Re: Netscape Bookmarks in Linux and Windows????? (Jerry Lapham)
  my  5634bts video ready modem? (h8te)
  Corel Linux installation problem (Eduardo)
  URG : Problem with starting X Font Server on Linux Machine (Karmendra Kumar)
  Re: sending email with attachment (William Adderholdt)

----------------------------------------------------------------------------

From: [EMAIL PROTECTED]
Subject: Re: Redirection in bash...
Date: Sun, 12 Mar 2000 02:58:19 GMT

In article <[EMAIL PROTECTED]>,
  John Doe <[EMAIL PROTECTED]> wrote:
> Can someone explain to me (in plain English) the sequence of events
> represented by:
>
> 2>&1
[...]
> ls > filename 2>&1
[...]
> the significance/meaning of &1?

The 2>&1 redirects stderr to stdout, so that both get placed into the
specified file. Otherwise *most* of the output from the command would
make it to the file, but errors would still be printed out.

When using with a pipe, put the 2>&1 before the |:

foo_command 2>&1 | grep "what you want"

> I thought "&" identified a variable,
> for example &PATH.

You're thinking $PATH ('$' vs. '&')

--
Jim Buchanan        [EMAIL PROTECTED]     [EMAIL PROTECTED]
=================== http://www.buchanan1.net/ ==========================
"I don't think Microsoft is evil in itself; I just think that they make
 really crappy operating systems." -Linus Torvalds
========================================================================


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Tony Wiegand <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.system,alt.os.linux.mandrake
Subject: Re: How to re-create a boot disk
Date: Sun, 12 Mar 2000 03:15:43 GMT

All,

I would like to thank everyone for there suggestions.
I was finally able to  re-create my boot disk with a little
trial and error.

The main problem I had was I lent someone my 6.0
Mandrake disk, so when I re-created my boot disk
I used Redhat 5.1.   My system is using Ultra DMA
controller for the hard drives and with the older boot
image it wasn't properly picking up the drives.  I had
this problem before when I was using Redhat 5.1.
(back then I unhooked the drives from the DMA
controller and used the motherboard).   But I remember
there was a work around.

So my final solution was everyone's suggestion coupled
with the work around.

At the boot prompt I entered:

vmlinuz ide2=0xfff0,0xffe6 ide3=0xffa8,0xfbe6 root=/dev/hdg11

This booted me back into Mandrake where I recreated my
bootdisk.

                    Thanks again,
                    Tony


------------------------------

From: [EMAIL PROTECTED] (Len Philpot)
Crossposted-To: comp.os.linux.setup
Subject: Re: No sound with KDE desktop
Reply-To: [EMAIL PROTECTED]
Date: Sun, 12 Mar 2000 03:34:32 GMT

On 12 Mar 2000 00:17:21 GMT, [EMAIL PROTECTED] (Ron Gibson) wrote:

>>> If the other sounds work fine 
>>> as root 
>>>     type ln -s /etc/sysconfig/soundcard /etc/sysconfig/sound 
>>
>>This is Slackware I'm using and I have no /etc/sysconfig directory.  I
>>compiled the sblive from Creatives Open Source code and it is installed
>>as a module.  OSS can not be used.  The module is loaded at boot time
>>with /etc/config.modules.
>>
>>I play sounds fine from the command line etc, but nothing under KDE in
>>the way of system sounds. 

Other than using RedHat 6.1, your situation sounds just like mine: sound
works, except for KDE desktop events. I tried the symlink suggestion
above and after logging out and back in, everything now works as it
should.

??

 
 -------------------------------------------------------------
 - Len Philpot -> [EMAIL PROTECTED]           (personal)
 ---------------> [EMAIL PROTECTED]                 (work)
 ----- ><> -----> http://www.centuryinter.net/lphilpot/  (web)

------------------------------

From: [EMAIL PROTECTED] (Benoit Goudreault-Emond)
Subject: Re: C++ in Linux
Reply-To: [EMAIL PROTECTED]
Date: Sun, 12 Mar 2000 03:47:22 GMT

In article <[EMAIL PROTECTED]>, Jean-David Beyer wrote:
[snip]
> "The C++ Programming Language" by Bjarne Stroustrup is a useful reference;
> I have the Second Edition, but I believe that at least the Third Edition is
> out.

By all means, if you have the money, or if the original poster is reading
this, get the third edition.  It's a whole new book.

Some people have expressed complaints about the style, in that it was less
clear that the second edition.  Personally, I found it OK; it's definitely
useful in general.  However, even if the later chapters on software
engineering are important and even though I agree with Dr. Stroustrup's
views, I thought they would have been better placed in another book than a
language reference...

(Then again, nobody seems to read software engineering books, so maybe
putting it in a language reference was not so bad after all)

-- 
Benoit Goudreault-Emond
CoFounder, KMS Group ; Student, B. Comp. Eng, Concordia University
``Being too close to a fireball can worry a man --- to death.''
        -- Zeb Carter in "The Number of the Beast" by Robert A. Heinlein

Note:   the "From:" address is not correct to protect myself against spam.
        My actual e-mail address is: ``bge AT crosswinds DOT net''

------------------------------

From: Jeff Evans <[EMAIL PROTECTED]>
Subject: test only
Date: Sat, 11 Mar 2000 19:18:54 -0800
Reply-To: [EMAIL PROTECTED]


test to observe headers
--
*************************************************
   Jeff Evans             [EMAIL PROTECTED]
Audio Intervisual Design   phone 323 845-1155
  Los Angeles, CA          fax   323 845-1170
*************************************************



------------------------------

Date: Sun, 12 Mar 2000 03:57:59 +0000
From: John Doe <[EMAIL PROTECTED]>
Subject: Re: Redirection in bash...

Paul Kimoto wrote:
> 
> 
> Excerpted from Kernighan & Pike 1984:
> 
> : The construction 2>filename (no spaces are allowed between the 2 and
> : the >) directs the standard error into the file; it's syntactically
> : graceless but it does the job.
>  ***
> : It is also possible to merge the two output streams:
>  [example elided]
> : The notation 2>&1 tells the shell to put the standard error on the same
> : stream as the standard output.  There is not much mnemonic value to the
> : ampersand; it's simply an idiom to be learned.  You can also use 1>&2 to
> : add the standard output to the standard error.
> 
> The small integers are the "file descriptors" used by the program.  The
> standard input is 0, the standard output is 1, and the standard error is 2.
> 
> So actually ">" does not mean "standard output", but rather tells the shell
> to redirect some output stream somewhere else.  Redirecting the standard
> output explicitly would be "1> somewhere", but ">" standing alone is
> defined to mean the same thing.  The "&" tells the shell that you are not
> referring to a filename, but rather to some (numbered) stream.
> 
> >    I thought "&" identified a variable,
> > for example &PATH.
> 
> No, that would be "$PATH".
> 

Ooops on that latter item!  Thanks for your excellent response.  That's
exactly what I was looking for.

------------------------------

From: [EMAIL PROTECTED] (Andrew J. Perrin)
Subject: Re: Goofy apache "bug"
Date: 11 Mar 2000 19:54:49 -0800

"Dheera Venkatraman" <[EMAIL PROTECTED]> writes:

> I have the following script, index.cgi, in my /home/httpd/html directory:

Comments on the script follow....

> #!/usr/bin/perl

use the -w flag. Always.

> print "Content-type: text/html\n";
> $a=$ENV{"HTTP_HOST"};

Generally a bad idea to use $a and $b, although they won't screw you
up in this case, since they are used by sort().

> $a=~s/(.*?)(\.)(.*)/$1/i;

You're capturing more than you need.
$a =~ s/(.*?)\./$1/i;

> if(sqrt($a*$a) ne $a && $a!~/^(dheera)$/i && $a!~/www/i) {
> 
> # sqrt($a*$a) ne $a makes sure the URL isn't an IP address

if ($a !~ /^[0-9.]+$/) would be faster and cleaner.

> # $a!~/^(dheera)$/i makes sure it isn't my usual dheera.yi.org
> domain

No need to capture, or even to use a regex here:

$a ne 'dheera'

> # $a!~/www/i makes sure it isn't www.dheera.yi.org

Ditto.
lc($a) ne 'www'

> 
>   print "Location: /".$a."\n\n";               # Redirect the browser

print "Location: /$a\n\n";

Why use double-quotes if you're not even going to use them?

>   print $a;
> }
> else {                   # If it isn't a "subdomain", return contents of
> index.html
>   print "\n";
>   open(INFILE,"<./index.html");

Nitpick, but no need for double quotes (no interpolation), or <,
here:

open(INFILE, './index.html');

>     @lines=<INFILE>;
>     foreach $line (@lines) {
>       print "$line\n";
>     }

This is a waste.

while (<INFILE>) {
        print;
}

>   close(INFILE);
> }
> 

> Now.... It works fine and everything... hello.dheera.yi.org redirects to
> dheera.yi.org/hello and test.dheera.yi.org redirects to
> dheera.yi.org/test...
> 
> *but*... asdf.dheera.yi.org just spits out the whole source code of this
> script instead of redirecting to dheera.yi.org/asdf.
> 
> JUST asdf.dheera.yi.org. Everything else I've tried works. Wierd.

Of course, nothing I've noted above can explain this.  My best guess
is a misconfigured ScriptAlias somewhere in your apache conf file.

> 
> I am just posting this in case there is a security hazard somewhere else
> related to this issue (i.e. can anyone get source code of cgi scripts by
> going through asdf.yourdomain.com ?)

No. Try it and see. Not to mention that that would be a truly bizarre
backdoor!


-- 
==============================================================
Andrew J. Perrin    -     UC Berkeley, Sociology & Demography
Consulting: Solaris-Linux-NT-Samba-Perl-MS Access-Postgres
[EMAIL PROTECTED] - http://demog.berkeley.edu/~aperrin

------------------------------

Date: Sun, 12 Mar 2000 04:08:03 +0000
From: John Doe <[EMAIL PROTECTED]>
Subject: Re: New to linux - need firewall/nat

Tim Hicks wrote:
> 
> I guess that subject line says it all.  I have never even seen a machine
> running linux, but I have an old 486dx2 66 / 24Mb ram / 424Mb HD.  I also
> need to be able to run a proxy server so that I can share access to a cable
> modem connection on my lan.
> 
> Questions:
> 
> 1)    What is the most appropriate distribution for my needs?  I have heard
> that Corel is designed with ease of use in mind.  I know that RedHat seems
> to be the most widely recognised.
> 
> 2)    With my non-existent experience of linux, will I be able to setup the
> services that I require on my own (or perhaps, if I'm lucky, with some help
> from you guys here!)?
> 
> 3)    Is my 486 up to the task of running this service for a lan that will
> normally have just 2 computers, but may need to take up to 4.
> 

As a first-time user, setting up a firewall is not the way to start
learning Linux unless you have A LOT of time on your hands.

Aside from having to familiarize yourself with Linux basics, you will
need to learn IP security (in a Unix environment).  Also, you would
likely need to recompile the Linux kernel to achieve good performance
and tight security, which is also a non-trivial task.

------------------------------

From: Jordan Hiller <[EMAIL PROTECTED]>
Subject: Can't logout of Gnome
Date: Sun, 12 Mar 2000 05:10:18 GMT

I am running Gnome on Red Hat 6.0. For some reason I can't seem to
logout. When I click logout from the "start menu," absolutely nothing
seems to happen. The same thing if I add a logout button to the panel
and click it. To get out of Linux, I am forced to reboot.

Anyone know why this is happening and how I can fix it?

Thanks,
Jordan Hiller

------------------------------

From: "Adam C. Emerson" <[EMAIL PROTECTED]>
Subject: Re: Do you hate vi?  vi or vim?  Deathmatch!
Crossposted-To: uk.comp.os.linux,comp.editors,comp.unix.misc
Date: Sun, 12 Mar 2000 05:15:55 GMT

In comp.os.linux.misc Ralf Arens <[EMAIL PROTECTED]> wrote:
> Strange, my Vim comes by default linked to nothing as source code. ;-)

Alright, alright, default is to link with the X libraries, when building
from source, IIRC, and most binaries that I've seen link to them.

-- 
Adam C. Emerson                                   [EMAIL PROTECTED]
"I think it's just horrible that the only people who can control the
Internet are people who understand it."

------------------------------

From: Jason Breitweiser <[EMAIL PROTECTED]>
Subject: VooDoo3 corrupts display
Date: Sun, 12 Mar 2000 05:11:51 GMT

I have VooDoo3 2000 card and my video corrupts when I exit Unreal
Tournament.  Does anyone know a work around?

Jason


Sent via Deja.com http://www.deja.com/
Before you buy.

------------------------------

From: Luke <[EMAIL PROTECTED]>
Subject: Re: Can't logout of Gnome
Date: Sun, 12 Mar 2000 05:20:47 GMT

does <ctrl>+<alt>+<backspace> do anything?

> I am running Gnome on Red Hat 6.0. For some reason I can't seem to
> logout. When I click logout from the "start menu," absolutely nothing
> seems to happen. The same thing if I add a logout button to the panel
> and click it. To get out of Linux, I am forced to reboot.
>
> Anyone know why this is happening and how I can fix it?
>
> Thanks,
> Jordan Hiller


------------------------------

From: Floyd Davidson <[EMAIL PROTECTED]>
Subject: Re: Redirection in bash...
Date: 11 Mar 2000 19:35:01 -0900

John Doe <[EMAIL PROTECTED]> wrote:
>Can someone explain to me (in plain English) the sequence of events
>represented by:
>
>2>&1
>
>I understand > to mean standard output, and < to mean standard input,
>but I'm a bit confused by this syntax.  I understand, for example:
>
>ls > filename 2>&1
...

Others have answered this with correct, and to the point, answers.

I'd like to point out that reading the man page for bash (or any
other shell) is the ultimate way to find an answer for these
types of questions.  In the above case, running "man bash" and
then doing a search (using the '/' key) for "redirection" (or
even better yet, for "REDIRECTION") is the appropiate way to
learn a great deal more about the subject.  Lacking enough
knowledge to use the right terms, a search on ether "2>&1" or
">&1" or even just "&1" would be *very productive*.

Not to say that the man page is easy to understand on this
point!  It is terse on a complex subject.  But it *is*
comprehensive, and it wouldn't take but a very small amount of
experimenting with the various examples given to understand
exactly what is meant.  The results would be a *complete*
understanding of the expression

  cmd > filename  n>&word

rather than just a surface knowledge of the most often seen use
(which probably should be replaced by the shortcut "cmd >&filename"
anyway).

  Floyd

-- 
Floyd L. Davidson                          [EMAIL PROTECTED]
Ukpeagvik (Barrow, Alaska)

------------------------------

From: "David .." <[EMAIL PROTECTED]>
Subject: Re: tar and unwanted ownership
Date: Sat, 11 Mar 2000 23:20:38 -0600

Best of luck
-- 
Due to extreme SPAM abuse! Remove z's and x's from above to reply.
Thnak the spammer's A..holes that they are. Still can't reach me?
Then your address range is already blocked due to previous spam.
Sorry!  I hate spam!!

------------------------------

From: Luke <[EMAIL PROTECTED]>
Subject: help with TAR
Date: Sun, 12 Mar 2000 05:28:52 GMT

I'm trying to make a backup of my entire filesystem...  /bak is a
partition I made to hold backup files like this.  This is the command I
am using:

tar -clvzPf /bak/backup3-11-00.tar --exclude /bak /
This should create a new archive, stay on the local filesys, tell me
what's going on, compress it, keep the "/" at the beginning, send the
output to a file on the /bak partition, and exclude everything on /bak
and start at / (root).

The command works, and the files go flying down the screen, but for some
reason the final archive is only 12 meg.  I have over 400 meg of data
spread over /var,/usr,/home, and so forth...  What is going on?  I know
I'm not getting a 33:1 compression ratio! :)  I'm running it as root,
and the system is being used, but I'm told that doesn't matter.




------------------------------

From: Jordan Hiller <[EMAIL PROTECTED]>
Subject: Re: Can't logout of Gnome
Date: Sun, 12 Mar 2000 05:30:51 GMT

Yup, it seems to go out of Gnome, shows a text-only login for half a
second, and goes right back into Gnome. 

Any suggestions?

Jordan

Luke wrote:
> 
> does <ctrl>+<alt>+<backspace> do anything?
> 
> > I am running Gnome on Red Hat 6.0. For some reason I can't seem to
> > logout. When I click logout from the "start menu," absolutely nothing
> > seems to happen. The same thing if I add a logout button to the panel
> > and click it. To get out of Linux, I am forced to reboot.
> >
> > Anyone know why this is happening and how I can fix it?
> >

------------------------------

Crossposted-To: comp.os.linux.networking
From: [EMAIL PROTECTED] (Jerry Lapham)
Date: Sat, 11 Mar 2000 21:09:21 -0500
Subject: Re: Netscape Bookmarks in Linux and Windows?????

In <[EMAIL PROTECTED]>, on 03/11/00 
   at 01:08 PM, Jan Schaumann <[EMAIL PROTECTED]> said:

> > has anybody have a good solution for using the same bookmarks file in
> > Windows and Linux?

> cp the file from windows (I think it's bookmark.htm) to your linux-drive
> into your .netscape/ directory and name it bookmarks.html. That's all.

Or just bookmark your Windows bookmark.htm in your Linux bookmark.htm. 
You'll, of course, need to have your Windows partition mounted.

    -Jerry
-- 
============================================================
Jerry Lapham, Monroe, OH
E-Mail: [EMAIL PROTECTED]
Written Saturday, March 11, 2000 - 09:09 PM (EST)
============================================================
MR/2 Ice tag:  Rush is always right.


------------------------------

From: h8te <[EMAIL PROTECTED]>
Subject: my  5634bts video ready modem?
Date: Sun, 12 Mar 2000 06:30:08 GMT

i set corel linux up fine , but it tells me my modem is busy, i dont think 
this is a winmodem maby im worng , its is isa modem , i had the same sh#t 
with red hat, suse, mandrake and caldera! can any one help, if you have a 
good tip please mail it to me... [EMAIL PROTECTED] thanx h8te 
ps:kde

--
Posted via CNET Help.com
http://www.help.com/

------------------------------

From: Eduardo <[EMAIL PROTECTED]>
Subject: Corel Linux installation problem
Date: Sun, 12 Mar 2000 06:30:04 GMT

  I'm trying to install Corel Linux on my machine but at the begging of 
installation, after "Detecting Hardware" and the quick message "Starting 
Graphical Install" the screen looks disrupted and when I press Esc the 
machine reboots.
   It's looks like a video problem.... my video board is a Trident 9660.

  Could anyone help me?

  Thanks

--
Posted via CNET Help.com
http://www.help.com/

------------------------------

From: Karmendra Kumar <[EMAIL PROTECTED]>
Subject: URG : Problem with starting X Font Server on Linux Machine
Date: Sun, 12 Mar 2000 06:30:08 GMT

I have Linux version 2.2.1-ac1 i686 [ELF] installed on my swap partition 
and have been working on it since last 5 months. Today, when I started the 
machine Linux was able to boot but instead of starting X Window Manager,
it displayed the following error :

===========================================================================
hda : status timeout : status =0xd0 {Busy}
hda : no DRQ after issuing WRITE, ide0:reset:success.

According to /var/run/gdm.pid, gdm was already running but seems to have 
been murdered mysteriously. (PID <some no.>)
:
:
:
<The above 'According to....' message was dispalyed 10 times with ten 
different PID nos.>

INIT:Id "x" respawning too fast : disabled for 5 minutes.
===========================================================================

With the above message on the monitor screen, the system waited for user 
response. When I pressed the "Enter", I am taken to the terminal prompt. I 
checked the gdm.pid file and I found one sigle PID entry there. When I try 
to 'kill' that PID no., the system says -- "No such PID exists."

Also, following is the last few lines I found in the error log 
file /var/gdm/:0.log :

===========================================================================
_FontTransSocketUNIXConnect : Can't connect : error = 111
failed to set default font path 'unix/:-1'

Fatal Server error :
could not open default font 'fixed'

X Connection to :0.0 broken (explicit kill or server shutdown)
===========================================================================

Please, some one help me with this AEAP. I have only receently shifted to 
Linux from Windows and I don't want to leave Linux and go back to Windows.

Thanks a lot.

Hail Linux!

KK

Nete Karma
Lead Associate,
Netesoft India Ltd.
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.netesolutions.com




--
Posted via CNET Help.com
http://www.help.com/

------------------------------

Reply-To: William Adderholdt <[EMAIL PROTECTED]>
Subject: Re: sending email with attachment
From: [EMAIL PROTECTED] (William Adderholdt)
Date: Sun, 12 Mar 2000 07:01:58 GMT

In article <8adjch$9h5$[EMAIL PROTECTED]>, coco  <[EMAIL PROTECTED]> wrote:
> How do you attach a file with email? I don't see this option in when i
> man mail.

If you want to continue using the Berkeley mail syntax, there is always
the "mailto" program that comes with Metamail.  To attach a file, you
just type ~* on a line.

William Adderholdt

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.misc) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Misc Digest
******************************

Reply via email to