Just don’t use command substitution: use for name in *
.
More Related Contents:
- How to loop over files in directory and change path and add suffix to filename
- Which characters need to be escaped when using Bash?
- Extract filename and extension in Bash
- How to remove files starting with double hyphen?
- How to rename with prefix/suffix?
- Can I export a variable to the environment from a Bash script without sourcing it?
- Passing arguments to an interactive program non-interactively
- How to urlencode data for curl command?
- How to execute a bash command stored as a string with quotes and asterisk [duplicate]
- How to define hash tables in Bash?
- Assigning default values to shell variables with a single command in bash
- Why isn’t tilde (~) expanding inside double quotes? [duplicate]
- sed search and replace strings containing / [duplicate]
- What is the difference between “$@” and “$*” in Bash? [duplicate]
- Count occurrences of a char in a string using Bash
- How to redirect output of an entire shell script within the script itself?
- Getting “command not found” error in bash script
- How to make .bashrc aliases available within a vim shell command? (:!…)
- What is the exact meaning of IFS=$’\n’?
- How to check if running in Cygwin, Mac or Linux?
- Using getopts inside a Bash function
- choosing between $0 and BASH_SOURCE
- What does ${ARGUMENT+x} mean in Bash? [duplicate]
- Use sed to replace all backslashes with forward slashes
- How can I calculate time elapsed in a Bash script?
- Why does “local” discard the return code of a command?
- sed multiline delete with pattern
- How to give a pattern for new line in grep?
- Grep output with multiple Colors?
- What does — do when running an npm command?