In fish
shell, the psub
command performs process substitution, so your example would be:
vimdiff (tail /tmp/cachain.pem | psub) (tail /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem | psub)
By the way, I think editing a file in comparison with a specific Git revision of that file is a particularly useful case of process substitution and vimdiff
. Define (in fish
syntax, but easily adaptable to POSIX shell syntax)
function vimgitdiff
vimdiff $argv[1] (git show $argv[2]:$argv[1] | psub)
end
then call
vimgitdiff path/to/file branch-name
to open Vim
with path/to/file
as currently in the working tree on the left and as on branch-name
on the right.
tcsh
without creating a file https://unix.stackexchange.com/questions/5111/operate-on-command-output-in-tcsh – simona Jun 01 '18 at 15:07-f
to avoidFile "/proc/32293/fd/11" no longer available
errors. – svlasov Apr 09 '19 at 12:26