Is there a way to write upside down on both sides of the pipe (|
)?
If you accidentally write from the "Call the Standard Input recipient's command", you want to continue without going back to the beginning.
So
<Receiver Command Call><Something with Command Call to Standard Output>
I'm looking for a notation in the form of .
Ideally
<Receiver Command Call><Something><Command Call>
Standard Output
Yes.
First of all, I came up with a way to use redirect and process replacement.
$ps-e | grep avahi-
876?00:00:00 avahi-daemon
1016?00:00:00 avahi-daemon
$ grep avahi -<<(ps-e)
876?00:00:00 avahi-daemon
1016?00:00:00 avahi-daemon
Please let me know if there are any more compact notation (less types, no more than one feature combined, etc.).
bash shellscript
If the previously mentioned command reads the filename specified in the argument, there is no need to redirect it.The example grep
can be written as follows:
$grep avahi<(ps-e)
© 2024 OneMinuteCode. All rights reserved.