> > Well, maybe it's just me having been confused.  Ok, here are the
> > relevant parts from *debug...*
> 
> Good.  What does *debug tramp/foo* say when you omit "2>/dev/null"?
> My guess: there it shows the error msg.

$ tramp_file_attributes () {
/bin/perl -e '$f = $ARGV[0];
@s = lstat($f);
if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = "\"$l\""; }
elsif (($s[2] & 0170000) == 040000) { $l = "t"; }
else { $l = "nil" };
printf("(%s %u %u %u (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\n",
$l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
$s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
$s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0] & 
0xffff);' $1
}
[...]
$ tramp_file_attributes /home
Number found where operator expected at -e line 3, near "if (($s[2] & 0170000) == 
0120000"
  (Might be a runaway multi-line == string starting on line 2)
        (Do you need to predeclare if?)
syntax error at -e line 3, near "if (($s[2] & 0170000) == 0120000"
syntax error at -e line 3, near "; }"
Execution of -e aborted due to compilation errors.


And in the ksh:

$ tramp_file_attributes () {
/bin/perl -e '$f = $ARGV[0];
@s = lstat($f);
if (($s[2] & 0170000) == 0120000) { $l = readlink($f); $l = "\"$l\""; }
elsif (($s[2] & 0170000) == 040000) { $l = "t"; }
else { $l = "nil" };
printf("(%s %u %u %u (%u %u) (%u %u) (%u %u) %u %u t (%u . %u) (%u %u))\n",
$l, $s[3], $s[4], $s[5], $s[8] >> 16 & 0xffff, $s[8] & 0xffff,
$s[9] >> 16 & 0xffff, $s[9] & 0xffff, $s[10] >> 16 & 0xffff, $s[10] & 0xffff,
$s[7], $s[2], $s[1] >> 16 & 0xffff, $s[1] & 0xffff, $s[0] >> 16 & 0xffff, $s[0] & 
0xffff);' $1
> > > > > }> > > > > 
$  tramp_file_attributes /home
(t 2 0 0 (15118 24787) (15118 24787) (15118 24787) 9 16749 t (0 . 3) (24 1))

Sven

PS: I now realised where the perl versus perl5 Problem originated:  I
    used two different machines to generate the output, and one did
    have a perl5 installed.  However, it works on neither...
-- 
 _  __                     The Cognitive Systems Group
| |/ /___  __ _ ___                                       University of Hamburg
| ' </ _ \/ _` (_-<  phone:    +49 (0)40 42883-2576      Vogt-Koelln-Strasse 30
|_|\_\___/\__, /__/  fax  :    +49 (0)40 42883-2572             D-22527 Hamburg
          |___/ http://kogs-www.informatik.uni-hamburg.de/~utcke/home.html

Reply via email to