Answer the question
In order to leave comments, you need to log in
How to write a bash script to iterate through files in a specific directory?
You need to create a bash script that creates a directory and copies there
files whose names begin with the letter A (if the directory is not set, it searches in the home
directory)
It is not possible to name this function of setting the search directory through arguments, the code for file in $2 does not work
Answer the question
In order to leave comments, you need to log in
You need to create a bash script that creates a directory and copies there files whose names begin with the letter A
for ... in
only works with strings: tryfor file in `ls $2`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question