Hashtag Search
Search results for "#bash"
-
posted 2019-05-31 06:53
kiyokawa's Blog
by
kiyokawa
At times, I'd like to perform an action against all files in a directory like this: for i in `find . -type f` do cp "${i}" "${i}.bak" done This fails when filenames contain spaces, as bash uses whitespace, tab and LF as the default delimiter. Solution? Do this: SAVEIFS=$IFS IFS=$(echo -en "\n\b")