I have a shell script which I simply cannot do without: bar from Theiling Online
I use SSH a lot and on a variety of *nix servers. However, I am not a system administrator and usually don't have the time or privileges to install it on every server I connect to.
It is apparently a very portable
sh script and has command line options to export itself as a shell function, which got me thinking: Could I use one of OpenSSH's subjectively obscure features to export it everywhere I go?
My first thought was to assign the source to an environment variable like
BAR = "cat -v" and then execute it on the other side as `$BAR`, but 1) I can't even get the cat example to to work locally, 2) I don't know how to put the script's actual multiline source into an environment variable and 3) I have yet to see a machine with
I guess I could even do with an ssh option to write a file called
~/bar at logon, but a more volatile solution would be better.
wget http://.../bar at logon would be unacceptable.
P.S. Putty-specific solutions, though I doubt any would exist, are also fine.
Edit: The reason I don't want wget and other file-based solutions is that I don't want to leave a mark since sometimes I connect as other people's users or root. I also don't want every server I connect to making an HTTP request. I want this to have as little overhead as possible.