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),
> 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 with bash's bilt-in test and the stand-alone test.
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 in
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 Fri, 16 Feb 2001, Edward J. Sabol wrote:
> There's a problem with this if you have a directory named "perl"
> inside a directory in your path. I'm not all that familiar with
> Bourne shell syntax, so the following may not be syntactically
> correct, but you need to do something like this:
>
>
>>> 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/pe
Any other functions which should be optimized in this way?
Maybe. Proposals?
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
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.
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
> 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; do
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
wer
[EMAIL PROTECTED] (Kai Großjohann) 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" wh
On 18 Jan 2001, Chris Green wrote:
> [EMAIL PROTECTED] (Kai Großjohann) 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 r
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
Kai Großjohann wrote:
> How am I supposed to check the value of $SHELL? Also, csh-like shells
> might have $shell rather than $SHELL...
>
> As you can see, even the `if' command is quite different.
Uh yeah. dead end.
>> Does it make sense to do a which()-like command, and use that
>> version
[EMAIL PROTECTED] (Kai Großjohann) 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 Wed, 17 Jan 2001, Bruce Ingalls wrote:
> Kai Großjohann 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 lo
On 17 Jan 2001, Chris Green wrote:
> Would it be possible to have ( or perhaps there already is ) a list
> of commands that get executed on the remote host to ``prep'' sh for
> tramp? The main one that comes to mind for me is unalias ls instead
> of getting ls --color=auto commented out. Of cou
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 comman
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 tha
Kai Großjohann 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 wh
[EMAIL PROTECTED] (Kai Großjohann) 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
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 wher
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 $?
tramp
25 matches
Mail list logo