Answer the question
In order to leave comments, you need to log in
Can you please explain bash script?
while read FILE_NAME; do
echo $FILE_NAME;
done < <(ls -1 "./my_temp_dir/")
done < <(ls -1 "./my_temp_dir/")
Answer the question
In order to leave comments, you need to log in
https://www.opennet.ru/man.shtml?topic=bash&catego...
These are two different constructs.
The first < character is standard input redirection .
<(...) is Process Substitution , i.e. the output of the command in brackets will be like a file.
In this script, this is all apparently done solely for demonstration purposes.
1. https://tldp.org/LDP/abs/html/process-sub.html
2. bash is an interpreter, you can always insert pieces of an expression and see what they produce, for example:
echo <(ls -1 .)
/dev/fd/63
shopt -s nullglob
for f in my_temp_dir/*; do
echo "$f"
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question