[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-dev] Tor Control Protocol: multiple commands in a single line possible?



Patrick Schleizer <patrick-mailinglists@xxxxxxxxxx> writes:

> Does Tor's control protocol actually support something like ; ?

I'm not sure if this helps for your use-case, but my "carml"
command-line tool can read commands from a pipe and execute them all. A
simple example:

   echo "GETINFO process/user" > foo
   echo "GETINFO process/pid" >> foo
   cat foo | carml cmd -

So, this will produce stdout like this:

   process/user=debian-tor
   process/pid=1234

(Of course, you can make the above shorter/different in various ways,
and GETINFO accepts multiple keys already, but "illstrative purposes"
etc...)

-- 
meejah
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev