I'm trying to loop over files in a directory given as an argument for a script in bash.
#!/bin/bash
directory=$1
for file in $(find "$directory" -type f 2>/dev/null)
do
echo "$file"
done
when running the script:
./script_name directory_name
nothing happens.
Many thanks in advance.