I am trying to pass result of which env to nano by this command nano < which env, but it seems, that I didn't understand the whole concept.
When I execute this I assume that: which env STDOUT will go to the nano STDIN. So this will equal to nano /some/path. But, apparently, I am wrong.
Also I tried which env | nano with same purpose, but output was:
Received SIGHUP or SIGTERM
Can somebody clarify this?
which env | nano -, where-means stdin.nano <(which env)envin your system is something editable by nano (it's a 64-bit Mach executable on mine, so I don't really want to risk corrupting it), so I substituted thecdcommand andnano $(which cd)does what you are expecting, at least on OSX.nanowhich env``, but also I hoped for a little bit more detailed answer with explanation how it works and why my solution does not.