Unix rocks, or at least one of its design feature does: everything is a file.
Here is one funny use of that feature. I consider that programs that manipulate text should basically take it on their standard input, and write it to their standard output, while specifying the name of an input or output file should be an optional refinement.
Well, at least one program was designed the other way: when used to import a foreign key, ssh-keygen -i has no option to read it on its standard input. No problem, this can be worked around:
# ssh-keygen -if /dev/stdin [paste the foreign key here]
Unfortunately, that does not work with every action of ssh-keygen since not all of them were written to be able to handle streams, which cannot be rewound.
8 comments
monday 16 april 2012 à 21:35 Adam Skutt said : #1
tuesday 17 april 2012 à 02:05 Stan Schwertly said : #2
tuesday 17 april 2012 à 12:30 Eddi said : #3
tuesday 17 april 2012 à 13:03 Tanguy said : #4
tuesday 17 april 2012 à 21:10 9fan said : #5
tuesday 17 april 2012 à 22:39 Tranxene50 said : #6
tuesday 17 april 2012 à 22:47 Jakob said : #7
wednesday 18 april 2012 à 00:41 Adam Skutt said : #8