On Wed, Sep 18, 2013 at 03:04:10PM +0200, Michael Albinus wrote: > yary <not....@gmail.com> writes: > > > I'm not sure if perl is on Andrey's remote host, but I recall that > > other parts of Tramp uses it. So here are perl-based alternates to > > "id": > > > > # id -u > > perl -le 'print$>' > > > > # id -un > > perl -le 'print scalar getpwuid($>)' > > > > # id -g > > perl -le 'print($)=~/(\d+)/)' > > > > # id -gn > > perl -le 'print scalar getgrgid($))' > > Looks good, thanks! Andrey, do you have Perl there?
I haven't perl, but there is python. So, python-based alternates to "id" could looks like: # id -u python -c 'import os; print os.getuid()' # id -un python -c 'import os; print os.getlogin()' # id -g python -c 'import os; print os.getgid()' # id -gn python -c 'import os, grp; print grp.getgrgid(os.getgid())[0]' Best regards, Andrey. > > > -y > > Best regards, Michael. _______________________________________________ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel