Sync Script for Linux devices
#2
Star 
hey, nice job!
I've got three issues in my mind after a quick look - two aren't that big of a deal and one might cause unexpected results
1. less serious one is creating temp dir in current working directory - it will fail if temp dir exists on mkdir temp (but won't fail the whole script). mktemp -d may be more suitable in here
2. you may want to take a look at bash(1) manpage, specifically at shell builtin commands section set command (-e, -u and -o pipefail options)
3. the more serious one - filenames should be quoted, as they may contain spaces and this will cause weird behavior

other than this, it looks good!
  Reply


Messages In This Thread
Sync Script for Linux devices - by dageek247 - 2025-04-08, 03:22 AM
RE: Sync Script for Linux devices - by pgronkievitz - 2025-04-08, 09:52 AM
RE: Sync Script for Linux devices - by tebriel - 2025-04-22, 09:36 PM
RE: Sync Script for Linux devices - by dageek247 - 2025-04-28, 11:24 PM
RE: Sync Script for Linux devices - by dageek247 - 2025-05-03, 12:33 AM

Forum Jump: