Project

swf-pipes

0.0
No commit activity in last 3 years
No release in over 3 years
Various classes for dealing with system type pipes in linux
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.0.4
 Project Readme

pipes

Pipes is yet another library for launching programs and interacting with the shell.

Install

gem install swf-pipes

Usage

Base functionality is implemented in SystemPipe:

pipe = Pipes::SystemPipe.new('bash')
pipe.puts "date"
pipe.readline
>>> "Mon Jul  1 21:47:24 EDT 2013\n"
pipe.puts_command_read_number('echo 1')
>>> 1.0

The primary purpose of the library is to allow nested ssh connections to access resources behind a firewall

pipe = Pipes::SshPipe.new(['fw','logserver'],"log_admin")
pipe.puts_command_read_number 'find /var/log/ -type f |wc -l'
>>> 174

Developing

Fork It. Branch It. Pull-Request It.