Skip to content

Instantly share code, notes, and snippets.

@ale10257
Created May 9, 2017 20:21
Show Gist options
  • Save ale10257/c2d802def40d0d60bb55bf2d5b16f579 to your computer and use it in GitHub Desktop.
Save ale10257/c2d802def40d0d60bb55bf2d5b16f579 to your computer and use it in GitHub Desktop.
проверка на чётность bash
#!/bin/bash
D=`date +%j`
USER=$1
if [ $((10#$D % 2)) == 1 ];then
case $USER in
vet)
FILE=user_list_vet
cnf=.ydcmd_vet.cfg
;;
*)
FILE=user_list_all
cnf=.ydcmd.cfg
;;
esac
/bin/bash /root/rsync.sh $FILE $cnf
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment