You are not logged in.
Hi, when I run this command in terminal:
rsync -aAVx /var /data/backup/everything works as I expected, directory var is copied to directory /data/backup/ and result is /data/backup/var.
But when I create simple shell script rsync.sh:
#!/bin/bash
rsync -aAVx /var /data/backup/and run under terminal with command:
bash rsync.shI get strange result in directory /data/backup/ where new folder name is ''$'\r' or with tab-completion ^M:
ls -l
drwxr-xr-x 3 root root 4096 Jul 3 21:00 ''$'\r'What am I doing wrong. Thank you.
Last edited by StopkaPeter (2019-07-03 23:13:08)
Offline
What text editor did you use to create the script?
Also, don't name your scripts after existing utilities: it will break something at some point.
Offline
What text editor did you use to create the script?
When you mentioned this, it was clear right away. Problem was because I wrote scripts in windows and final files I transferred over usb in to Arch. After recreated scripts under linux, everything works for now. Thank you for tip.
Offline
Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline