mkdir won't work in a script but works on command line
Hey,
Code:
mkdir -p /cygdrive/c/Blah_Email_Backup/$i here is my output when I try the script: Code:
mkdir: cannot create directory `/cygdrive/c/Blah_Email_Backup/amyerhoff@blah.com\r': No such file or directory |
Show us the code snippet that produces the message?
|
Looks like a Windows line end. Was the script created under Windows? The dos2unix command can be used to convert Windows line ends to Linux ones.
|
Most the value of "$i" contains the "CR/LF" line termination from "Windows" (or just the "CR" from Apple) as Linux/UNIX only used the "LF" portion. Easy fix if using BASH is:
Code:
mkdir -p /cygdrive/c/Blah_Email_Backup/${i%\\.} |
All times are GMT -5. The time now is 07:47 PM. |