Quantcast
Channel: Active questions tagged fish - Stack Overflow
Viewing all articles
Browse latest Browse all 106

How to pipe on a condition in Fish?

$
0
0

See previous question, How to pipe on a condition in Bash. I'm interested in the same construct for Fish, i.e. shorthand for:

set check 0if test $check = 1   printf "foo\nbar\nbaz\n" | string match --regex ^felse   printf "foo\nbar\nbaz\n" | string match --regex ^bend

Viewing all articles
Browse latest Browse all 106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>