Page 1 of 1
[02:35:57] keithy: hello I am looking for the best way to run remote ssh commands , and collect the output, possibly as rak tasks
[03:04:06] keithy: if anyone can understand how to collect output from net-ssh-shell and go onto the next command
[03:33:21] keithy: ive got a callback to grab the output (cant understand why a simple usecase is not documented
[03:48:31] keithy: put together a bash script using “sub” to roll several commands into one. script A, checks out code with git, checks out deploy bash scripts , rsyncs them up to the server and then ou can run the scripts there!
[00:08:45] keithy: its working as expected! but somethings are a bit fragile… it doesnt make it through a whole disk
[00:20:29] keithy: My last argument was not expecting someone to try and turn it into a hash, it only knew to_str
[00:24:14] keithy: hello I have used find find I have tested it on 1TB of disk and its does what you said
[00:28:18] keithy: I then said that I apparently ran into an issue which ruby I dont think ruby had 15 years ago
[21:50:37] keithy: my usual approach is to walk the file tree one file at a time, thus not keeping anything in memory. You just say walker.nextFile
[21:51:16] keithy: cant find anything for effectively invoking and capturing a shell process as it works. except…
[21:55:27] keithy: ah found it https://nickcharlton.net/posts/ruby-subprocesses-with-stdout-stderr-streams.html
[23:49:15] keithy: I come back to ruby after 10 years and find I have to roll my own find file utility
[23:51:07] keithy: and is it efficient, not holding anythin in memry excep the path you are looking at
[23:54:46] keithy: performing operations on them, liike removing duplicates, moving new bits in with rsync, hardlinking something etc
[23:56:09] keithy: collecitn info on files duplicate, counts of images sizes of files disk wastage etc.