I have written a shell script which picks all the files recursively inside all the directories and prepared a report with the file last modified, size. The problem that I am facing, there are few files with name as "User Interface"(space in between). How to use there files in the for loop of the shell script and fetch the files and directories inside this. Thanks in advance
相关问题
- How to get the return code of a shell script in lu
- Invoking Mirth Connect CLI with Powershell script
- Emacs shell: save commit message
- “command not found” errors in expect script execut
- Python script using subprocess and xclip hangs if
相关文章
- 使用2台跳板机的情况下如何使用scp传文件
- In IntelliJ IDEA, how can I create a key binding t
- shell中反引号 `` 赋值变量问题
- How get the time in milliseconds in FreeBSD?
- Launch interactive SSH bash session from PHP
- Generate disk usage graphs/charts with CLI only to
- How can I create a small IDLE-like Python Shell in
- Pause shell script until user presses enter
Just put the file name variable between double quotes
"$FILENAME"
You're probably trying to use something like
for file in $(command)
. Instead, use awhile read
loop or afor
loop with globbing. Make sure you quote variables that contain filenamess.or, in shells that support process substitution:
If you're simply iterating over a list of files:
Google Search led me to this page