Open kash1982 opened 3 years ago
are you sure you got the script down correctly? I just ran it on 7.0-41890 and did not get that error. I am about to open another issue though :).
wget https://raw.githubusercontent.com/JeffersonDing/SynologyMerge/main/migrate.sh
chmod +x migrate.sh
./migrate.sh -f /volume1 -t /volume5
in my case.
Seems to be working on my side. Make sure to download the script raw, maybe you copied and pasted the script? Also, make sure you are using bash
to run the script, there might be some encoding issues with other shells.
i get the same error message. Running 6.2.3 using the exact same commands as you. Maybe an issue with DSM 6 vs DSM 7
Yeah, I did write this based on DSM6 and haven't tested it for DSM7 yet. Maybe that's the issue
I know this is old, but it can be helpful for other newcomers:
syntax error near unexpected token
newline
This typically means that the file was saved in a "Windows-like" CRLF line sequence format. Linux/SSH expects to see LF line sequence format. Re-download the file and/or convert it in a proper text-editor.
I aslo ran into the same issue when I tried to just run the command below. wget https://github.com/JeffersonDing/SynologyMerge/blob/main/migrate.sh < --Bad using the raw link like @wolflarson suggested worked great and just copying the code and saving it with a text editor work. using the goto file link added a bunch of html for some reason.
hi
i get the following when trying to execute the script
/root/migrate.sh: line 7: syntax error near unexpected token
newline' /root/migrate.sh: line 7:
<!DOCTYPE html>'