let's say I have a directory with the following files/directories:googleapplemozilla foundation   # a file with spacesbrowsersSo I would like to move files into browsers directory. Here is a script I wrote:for d in $(ls); do    if ! [ $d == browsers ]; then        mv $d browsers    fidoneThen google and apple went to browsers but I got:mv: cannot stat 'mozilla': No such file or directorymv: cannot stat 'foundation': No such file or directoryObviously, the problem is spaces in a variable. What's the proper way to deal with this?Of course I believe there should be a more elegant one-line command to do this, but I would like to know how I should use variables with spaces.
Dealing with spaces of variables for `mv`
bash;mv