Home > Enterprise >  What does '< <' command do in bash?
What does '< <' command do in bash?

Time:11-20

I can see >> is append and > is overwrite but I do not know what < < does with a space in the middle. What does this do, and does the direction of these arrows matter?

For example:

while :; do
mapfile -td '' archives \
< <(find . -type f -name '*.zip' -o -name '*.7z' -print0)

[[ ${#archives[@]} -eq 0 ]] && break

CodePudding user response:

< redirects a file as input to a command.

<(...) is a process substitution - it is replaced by a non-seekable file. From that file is read the output of the command inside.

  • Related