On Tue, Jan 31, 2017 at 3:59 AM, Henning Reich <f...@qupfer.de> wrote:
> Thanks for all the answers, I also found a solution, that worked for
> me...just not using fish ;-)
> find / -iname "*.pcap" -exec sh -c 'touch /tmp/$(basename {})' \;
That will work with fish as well with one small syntax change:
find / -iname "*.pcap" -exec fish -c 'touch /tmp/(basename {})' \;
or, using your original example:
find /search/path -iname "*.pcap" -exec fish -c '/path/to/tool -para1 $path
-para2 /tmp/results/(basename {})' \;
The only reason I didn't recommend the `-exec` solution is it's less
efficient than the alternatives. It's also often harder to read which can
lead to mistakes.
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users