No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help
Previous 5 Responses. View Responses


Grex Jelly Item 115: Unix tool o' the day.
Entered by cross on Sat Sep 18 06:28:48 UTC 2010:

1 new of 22 responses total.



#5 of 22 by remmers on Tue Sep 21 22:15:08 2010:

I don't know if ssh is commonly considered a "tool" in the same way
that ls and cat are, but I know that it and its relative scp can be
used in pipelines and other Unixy constructs for processing remote
data locally, without establishing a remote "session" in the usual
sense.  A few (probably silly) examples off the top of my
head of things I could do at a local shell prompt in a terminal
window on my laptop.  (What the examples actually do is left as
an exercise for the reader.)

(1)  ssh grex.org last | grep '\.msu\.edu ' | wc -l

(2)  ssh grex.org cat '/bbs/agora50/_*'|grep '^,U.*,cross$'|wc -l

(3)  for f in `ssh grex.org ls /bbs/agora33/_*`
     do scp grex.org:$f .
     done

Yes, I'm sure there are better ways of doing all the above (example 3
is particularly hideous), but I'm just illustrating a point here.


Last 17 Responses and Response Form.
No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss