Thursday, July 12, 2012

saving stdout to a different server via ssh

exec_sql.pl -s pd.sql | zip -9 | ssh login@$DEVIP "cat >> /home/user/data.zip"

zip -9 acts as a filter and zips the stdout on the fly.

and on the target machine to unzip do the following

unzip -p data.zip

No comments:

Post a Comment

Followers

About Me

Torrance, CA, United States