You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The canonical way of doing this without map in bash is not:
for f in $(ls *.c)
do
foo $f
bar $f
done
but
for f in *.c
do
foo "$f"
bar "$f"
done
because it handles whitespace in file names gracefully.
(Mantra: Don't parse the output of ls).
And most GNU-coreutils programs handle multiple input files themselves like
file X*
wc -m *.log
head *.conf
# ... many more
The text was updated successfully, but these errors were encountered:
The canonical way of doing this without map in bash is not:
but
because it handles whitespace in file names gracefully.
(Mantra: Don't parse the output of
ls
).And most GNU-coreutils programs handle multiple input files themselves like
The text was updated successfully, but these errors were encountered: