Let's say there is a set of commands as follows:
#!/usr/bin/env fish
command1
command2
command3
Each command prints its own output, which I want to hide. In bash it's rather simple:
#!/usr/bin/env bash
{
command1
command2
command3
} &> /dev/null
But it does not work in fish. Is there any solution other than sending each and every command to /dev/null? Can somebody help me with that?
Fish's equivalent to {} command grouping is begin and end, so
begin
command1
command2
command3
end &> /dev/null
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With