Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #2

Open
kash1982 opened this issue Sep 12, 2021 · 6 comments
Open

issue #2

kash1982 opened this issue Sep 12, 2021 · 6 comments

Comments

@kash1982
Copy link

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: '

@wolflarson
Copy link

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.

@jeofo
Copy link
Owner

jeofo commented Sep 23, 2021

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.

@TehDuffman
Copy link

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

@jeofo
Copy link
Owner

jeofo commented Dec 8, 2021

Yeah, I did write this based on DSM6 and haven't tested it for DSM7 yet. Maybe that's the issue

@michealespinola
Copy link

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.

@ailonag
Copy link

ailonag commented Dec 22, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants