mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ishikawa <ishikawa@yk.rim.or.jp>
To: Peter Samuelson <peter@cadcamlab.org>, linux-kernel@vger.kernel.org
Subject: Re: /usr/src/linux/scripts/ver_linux prints out incorrect info when "ls"  is aliased.
Date: Tue, 06 Feb 2001 01:15:01 +0900	[thread overview]
Message-ID: <3A7ED185.B9AEB000@yk.rim.or.jp> (raw)
In-Reply-To: <3A7D7210.EA87572A@yk.rim.or.jp> <20010205073929.A32155@cadcamlab.org>

Peter Samuelson wrote:

> [Ishikawa]
> > I just noticed that running
> >
> >         .   /usr/src/linux/script/ver_linux
> >
> > prints out strange libc version
> [...]
> > I found that if the command "ls" is aliased to "ls -aF"
>
> So ... don't use '.' to execute scripts.  If there is some
> documentation somewhere that told you to do this, please notify the
> author that it is wrong.
>
>   sh scripts/ver_linux
>

This is a good observation.

I have no idea why I invoked ver_linux using "." : I must have
seen it somewhere and just followed it somehow.

Hard to tell where I have seen. I must have seen it in the last few
days.

Here is one URL where "." is used, but this was not where I saw the
usage.

http://oss.sgi.com/projects/devfs/mail/devfs/msg00261.html

I have found the same problem cropped up in the kernel mailing list
before.

    http://uwsg.iu.edu/hypermail/linux/kernel/0003.1/0898.html

The above thread showed that non-other than Alan Cox also chimed in the
thread.

So there must have been a reason to let people try "." for
invoking /usr/src/linux/scripts/ver_linux.

One theory might be that, as a root, people may run
    # ./ver_linux   (under scripts directory).

And then, when they try to show what they did, they may
create a report showing the FULL path name of the scripts so that
there is no mistaking ver_scripts for something else.
And in doing so, somebody might have forgotten to remove the
leading "."
    #./usr/src/linux/scripts/ver_linux
Somebody eles looked at the above and "figured" that the
leading "./" is a typo and thus corrects it to ". /"
and now we have
   #. /usr/src/linux/scripts/ver_linux

Anyway, I have found another  libc version output
in somebody's post. The poster must have similar problem as I did.
(See at the end for ver_linux output result. )
http://www.uwsg.indiana.edu/hypermail/linux/kernel/9906.3/0990.html

So in any case, I think protecting the
ver_linux from strange interaction of various
shell features might be a good idea after all.

(I was not convinced why "sh /usr/src/linux/scripts/ver_linux" works
since /bin/sh is a symlink to bash in my setup and it seems that
my ./bashrc includes the ls alias. But when I tried it, it works. )


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-02-05 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-04 15:15 Ishikawa
2001-02-05 13:39 ` Peter Samuelson
2001-02-05 16:15   ` Ishikawa [this message]
2001-02-05 16:39     ` Peter Samuelson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A7ED185.B9AEB000@yk.rim.or.jp \
    --to=ishikawa@yk.rim.or.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@cadcamlab.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®