On Sun, 18 Feb 2001, Francesco Potorti` wrote:
Yes. The correct way is:
-f $dir/perl -a -x $dir/perl
Now I'm confused. What if /usr/bin/perl is a symlink to
/usr/bin/perl5.005 or something?
It works with a file (or simlink) and with a directory (or simlink),
both
On Sat, 17 Feb 2001, Francesco Potorti` wrote:
Yes. The correct way is:
-f $dir/perl -a -x $dir/perl
Now I'm confused. What if /usr/bin/perl is a symlink to
/usr/bin/perl5.005 or something?
Is it better to say "-f $d/perl -a -x $d/perl", or "-x $d/perl -a \!
-d $d/perl"?
kai
--
Be
I was afraid that this which-like command might be known by
various names on various systems, and the output might vary.
I tried this, and I think it should work on any bourne shell:
echo $PATH |
tr : \\n |
while read dir;
do if [ -x $dir/perl ];
then echo $dir/perl; break;
fi; done
do if [ -x $dir/perl ! -d $dir/perl ]
instead of just
do if [ -x $dir/perl ]
Yes. The correct way is:
-f $dir/perl -a -x $dir/perl
On Wed, 24 Jan 2001, Francesco Potorti` wrote:
I was afraid that this which-like command might be known by
various names on various systems, and the output might vary.
I tried this, and I think it should work on any bourne shell:
echo $PATH |
tr : \\n |
while read dir;
do if
Any other functions which should be optimized in this way?
Maybe. Proposals?
Francesco Potorti` writes:
I was afraid that this which-like command might be known by
various names on various systems, and the output might vary.
I tried this, and I think it should work on any bourne shell:
Yes but not for any tr. Try this change
echo $PATH |
tr : \\n |
Pete Forman [EMAIL PROTECTED] writes:
Francesco Potorti` writes:
I was afraid that this which-like command might be known by various
names on various systems, and the output might vary.
I tried this, and I think it should work on any bourne shell:
Yes but not for any tr. Try this change
I was afraid that this which-like command might be known by various
names on various systems, and the output might vary.
I tried this, and I think it should work on any bourne shell:
echo $PATH |
tr : \\n |
while read dir;
do if [ -x $dir/perl ];
then echo $dir/perl; break;
fi;
Kai,
# Bourne shell
if [ "$SHELL" = "/bin/sh" ] ; then
echo bourne, bourne
fi
# Csh
if ( "$SHELL" == "/bin/csh" ) then
echo c, c
endif
As you can see, even the `if' command is quite different.
Perhaps you were aiming at something entirely different, but if you
were just
[EMAIL PROTECTED] (Kai Grojohann) writes:
I think people should init their shell like this:
case "$TERM" in
linux|xterm)
alias ls=...
;;
esac
After all, printing color sequences on if $TERM=dumb does not make
sense.
I've done basically the same thing for
On Thu, 18 Jan 2001, Bruce Ingalls wrote:
I use which.el, myself, which is fast. However, I recall that there
is some which()-like emacs function.
Err. I need to do this on the remote host, not on the local host.
And the point of Tramp is that I don't need Emacs on the remote
host.
And if I
On 18 Jan 2001, Chris Green wrote:
[EMAIL PROTECTED] (Kai Grojohann) writes:
I was hoping to get a basic Bourne shell after "exec /bin/sh".
Therefore, the aliases should be off after this. Are they?
Yes they are.
Good. According to the docs, bash called as sh isn't supposed to read
[EMAIL PROTECTED] (Kai Grojohann) writes:
I confess that I've also got a strange prompt and I had to frob
shell-prompt-pattern to recognize optional color escape sequences.
Not pretty at all.
Okay. There is a new version of Tramp now which locally sets the env
var TERM to "dumb" when
I noticed this odd sequence of tests for perl in my tramp debug buffer:
$ test -x /bin/perl5 ; echo tramp_exit_status $?
tramp_exit_status 1
$ test -x /usr/bin/perl5 ; echo tramp_exit_status $?
tramp_exit_status 1
$ test -x /usr/sbin/perl5 ; echo tramp_exit_status $?
[EMAIL PROTECTED] (Kai Grojohann) writes:
then issuing this command is quite fragile already.) In the
beginning, I assumed that every Unix host had a /bin/sh and that "exec
/bin/sh" would be a good way to start a known shell from the
beginning.
Would it be possible to have ( or perhaps
Kai Grojohann wrote:
The only reason that tramp-remote-sh exists is that "exec /bin/sh" is
the very first command that's issued by Tramp, so that it at least
knows how to set the prompt and stuff like this.
Isn't $SHELL set at remote login?
You can usually look at /etc/shells to see what
Perhaps certain commands should be setq()ed.
You do not need to unalias ls, if you call
\ls
which invokes the original ls. I tested this command on solaris's
/bin/sh, which is _not_ xpg4 compliant. It still works.
ls --color=auto only works for gnu ls, and probably only gnu ls that
is less
Bruce Ingalls [EMAIL PROTECTED] writes:
Perhaps certain commands should be setq()ed.
You do not need to unalias ls, if you call
\ls
Didn't know this factoid - thanks you've saved me from having to type
/bin/ls everytime I mean it.
which invokes the original ls. I tested this command on
On Wed, 17 Jan 2001, Skip Montanaro wrote:
Why is /usr/bin/perl checked last? Seems to me to be the most
likely place to find it. Why not use something akin to
tramp-sh-program to allow users to specify odd locations for perl?
Tramp must check for perl5 first, since on those systems where
20 matches
Mail list logo