The <(list) syntax replaces that with a named pipe. Fish provides a builtin (well, written in fishscript, but part of the standard distribution) called psub.
function cmpdir; comm (ls $argv[1]|sort|psub) (ls $argv[2]|sort|psub); end -Kevin On Jul 18, 2012, at 5:22 AM, Steven Hum <sdot...@gmail.com> wrote: > In POSIX sh you can define the following > > cmpdir () { comm <(/bin/ls $1|sort) <(/bin/ls $2|sort); } > > but fish interprets the parentheses differently so the redirection fails e.g. > > function cmpdir; comm <(ls $argv[1]|sort) <(ls $argv[2]|sort); end > > is not legal. > > Is there a way of making this sort of command output redirect work in > fish? > > Thanks! > Steven > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Fish-users mailing list > Fish-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fish-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users