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. – MetNP Nov 29 '16 at 17:35nano <(which env)
– MetNP Nov 29 '16 at 17:41env
in 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 thecd
command andnano $(which cd)
does what you are expecting, at least on OSX. – Thomas N Nov 29 '16 at 17:44nano
which env``, but also I hoped for a little bit more detailed answer with explanation how it works and why my solution does not. – IgorNikolaev Nov 29 '16 at 17:48