1

I am trying to redirect the results of rg to comm to compare the match intersection. Fish seems to think that I will be passing a file path and and not the stream.

> comm -12 <(rg -l "\\bar\\b" | sort) <(rg -l "@" | sort)
fish: Invalid redirection target: (rg -l "\\bar\\b" | sort)
comm -12 <(rg -l "\\bar\\b" | sort) <(rg -l "@" | sort)
         ^
fish: Invalid redirection target: (rg -l "@" | sort)
comm -12 <(rg -l "\\bar\\b" | sort) <(rg -l "@" | sort)
3

comm -12 <( … ) <( … ) works in Bash but I believe the right syntax in fish is like

comm -12 ( … | psub ) ( … | psub )

Yes, psub belongs to the syntax.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.