From: Gary <help-gnu-emacs@garydjones.name>
To: help-gnu-emacs@gnu.org
Subject: Re: Scripting actions over tramp
Date: Wed, 06 Oct 2010 13:47:43 +0200 [thread overview]
Message-ID: <i8hnkv$qmr$1@dough.gmane.org> (raw)
In-Reply-To: 87bp78g1av.fsf@gmx.de
Michael Albinus wrote:
> Gary writes:
>
>> Is there a way to perform automated actions via tramp (or some other
>> method in emacs) on remote hosts?
>>
>> Something like:
>>
>> (tramp-ssh-connect some.host)
>> (tramp-exec "ls -la") ;; list directory contents on some.host
>> (tramp-disconnect some.host)
>
> (let ((default-directory "/ssh:user@some.host:"))
> (shell-command "ls -al"))
Thanks Michael. No wonder I couldn't find it - not only
,----
| shell-command is an interactive compiled Lisp function in `simple.el'.
| ...
| Not documented.
^^^^^^^^^^^^^^ (bah!)
`----
but I also wasn't aware of the ability to use it like that, even though
I pretty regularly use it via M-!.
next prev parent reply other threads:[~2010-10-06 11:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 12:13 Scripting actions over tramp Gary
2010-10-05 14:30 ` Michael Albinus
2010-10-06 11:47 ` Gary [this message]
[not found] ` <mailman.1.1286365681.29500.help-gnu-emacs@gnu.org>
2010-10-07 8:17 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='i8hnkv$qmr$1@dough.gmane.org' \
--to=help-gnu-emacs@garydjones.name \
--cc=help-gnu-emacs@gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).