Skip to content

rarely needed #3

Description

@Stefan-Wagner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions