Bash - Loop over files

for f in file1 file2 file3 file5 do echo "Processing $f" # do something on $f done # using shell variables FILES="file1 /path/to/file2 /etc/resolv.conf" for f in $FILES do echo "Processing $f" done

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.