I have this code:
for dir in "/Users/vskumar/Dropbox/alexa"/*
do
echo $dir
value=`cat $dir`
echo value
done
and the first file in the directory has the name as below:
amazon_alexa_february_7__2017_at_0504pm (2).txt
The output I get is:
/Users/vskumar/Dropbox/alexa/amazon_alexa_february_7__2017_at_0504pm (2).txt
cat: /Users/vskumar/Dropbox/alexa/amazon_alexa_february_7__2017_at_0504pm: No such file or directory
cat: (2).txt: No such file or directory
Basically, it is treating everything after space as another file name. How to fix it?