Afternoon, gang.
I confess, I'm not entirely sure quite what I'm doing here.
On several occasions in the past, I've scripted an instance of rxvt to run, stay open, and execute a command to display the output. Which all works fine. However, I'm getting a wee bit stuck on this one.....whether it's old age playing tricks with the old grey matter, or I'm just having one of those days when it simply isn't functioning, I don't know.
Here's the scenario:-
termbin.com is a terminal-based pastebin, OK? The particular operation I want to try & script is this:-
You can run inxi, with whatever parameters you choose, send the output direct to termbin, and the output you get back is a URL to your data.....which anybody else can then view direct in their browser for trouble-shooting purposes.
If I run
Code: Select all
inxi -Fxzzr | nc termbin.com 9999
.....in the terminal (these are termbin's own instructions, right?), I get back a URL as output. As expected.
What I'd like to do is to run a script which will open (u)rxvt, run that command & get the URL back, followed by sending that output - the URL - to a text file. Sounds simple, right? But trying to implement it is proving a right royal PITA...!
Code: Select all
rxvt --hold -e inxi -Fxzzr | nc termbin.com 9999 > /tmp/report.txt
.....is not doing it. Any suggestions, guys? Where am I going wrong?
Mike.