Let's assume I have a bash script example.sh. Running the script requires the argument which is the list of the directories. The the script works like this:
./example.sh "/dir/location/281/rest-of-the-location" "/dir/location/287/rest-of-the-location" "/dir/location/37/rest-of-the-location" "/dir/location/3007/rest-of-the-location"
All the list of the directories are saved in a file called file.txt. Is there a simple way to run the script instead putting the directories in the second quote like the above?
All the directories are saved in a file called file.txt
file.txt
/dir/location/281/rest-of-the-location
/dir/location/37/rest-of-the-location
/dir/location/3007/rest-of-the-location
/dir/location/3127/rest-of-the-location
/dir/location/37/rest-of-the-location
/dir/location/372/rest-of-the-location
/dir/location/137/rest-of-the-location