Say I want to send the output of to commands into another.
cat a.txt && ls
I can do this:
fish -c "cat a.txt && ls" | another_command
But it seems clunky, is there a way to do this without running a new instance?
Say I want to send the output of to commands into another.
cat a.txt && ls
I can do this:
fish -c "cat a.txt && ls" | another_command
But it seems clunky, is there a way to do this without running a new instance?
use a begin...end block
begin; cat a.txt; ls; end | another_command
or with whitespace
begin
cat a.txt
ls
end | another_command
begin ; echo hi ; sleep 2 ; echo bye ; end | cat
– Charlie Groves May 04 '22 at 17:21
another_command? – ideasman42 Feb 13 '19 at 08:02