[Fixed] Syntax error: word unexpected (expecting “)”)

mkdir.sh

Execute sh mkdir.sh XXX (argument)

Error: mkdirs.sh: 9: Syntax error: Word unexpected (“do”)
Syntax error: word unexpected (“)”)
Similar problems, the case see details
http://ubuntuforums.org/archive/index.php/t-1130892.html
http://forum.ubuntu.org.cn/viewtopic.php?f=21& t=416571

Summarize several questions:
1. dos2unix xxx
2. Sh mkdir.sh failed to run mkdir.sh directly
3. Modify the #!/bin/sh to #! /bin/bash, then execute bash mkdir.sh XXX
4. See if there are any errors in the syntax, if line wrapping is required; Etc.
5. For permission issues, try to implement a copy of cp
Ls-l look at the owner 

Read More: