10 lines
278 B
Plaintext
10 lines
278 B
Plaintext
|
#!/bin/bash
|
||
|
# Move all given files to a syncthing-like conflict file name based on the last argument
|
||
|
for last; do true; done
|
||
|
i=1
|
||
|
while test $i -lt $#
|
||
|
do file=${!i}
|
||
|
mv -iv $file $last.sync-conflict-$(stat -c %y $file | tr -d ':-' | cut -c-25 | tr ' .' '-')
|
||
|
i=$((i+1))
|
||
|
done
|