source: ZCS 7.1.4 CentOS 5
destination: ZCS 8.7.7 CentOS 7
Code: Select all
syncuser.sh: line 7: syntax error near unexpected token `('
syncuser.sh: line 7: ` --regexflag 's/\\\\(?!Answered|Flagged|Deleted|Seen|Recent|Draft)[^\s]*\s*//ig' \'
I got above error with imapsync script as below. Is there something wrong with regex used?
syncuser.sh
Code: Select all
imapsync \
--maxsize 52428800 --buffersize 8192000 \
--nofoldersizes --nosyncacls --subscribe --syncinternaldates \
--authmech2 PLAIN \
--exclude '(?i)\b(Junk|Spam|Trash)\b' \
'--skipheader 'X-*' \
--regexflag 's/\\\\(Answered|Flagged|Deleted|Seen|Recent|Draft)[^\s]*\s*//ig' --debugflags \
--regextrans2 's,:,-,g' \
--regextrans2 's,\",'\'',g' \
--regextrans2 's,\s+(?=/|$),,g' \
--regextrans2 's,^(Briefcase|Calendar|Contacts|Emailed Contacts|Notebook|Tasks)(?=/|$), $1 Folder,ig' \
--host1 "$host1" --host2 "$host2" \
--user1 "$username" --authuser1 admin_account_name \
--password1 admin_account_password \
--user2 "$username" --authuser2 admin_account_name \
--password2 admin_account_password \
--regextrans2 's,\",-,g' \ # change quotes to dashes
--regextrans2 's,&AAo-|&AA0ACg-|&AA0ACgANAAo-(?=/|$),,g' \
--ssl1 --authmech1 PLAIN --maxcommandlength1 16384 \
--dry --debug --debugimap \ # debug options