i want to do following action
for(File : find - ".java"){
// here i will do grep on the file, i want to process each file separetely
}
What is way to do this in bash?
i want to do following action
for(File : find - ".java"){
// here i will do grep on the file, i want to process each file separetely
}
What is way to do this in bash?
Just use a process substitution:
while IFS= read -r name;
do
# do things with $name, which contains the name of the file
done < <(find -type f -name "*.java")