Skip to content

Instantly share code, notes, and snippets.

@MEXAHOTABOP
Created September 12, 2012 10:42
Show Gist options
  • Save MEXAHOTABOP/3705867 to your computer and use it in GitHub Desktop.
Save MEXAHOTABOP/3705867 to your computer and use it in GitHub Desktop.
#! /bin/bash
start="244"
current=$(date '+%j')
weak=$(echo "$current/7-$start/7+1" | bc)
if [ $weak -eq $((weak/2*2)) ];
then
parity="чётная"
else
parity="нечётная"
fi
echo "сейчас $weak неделя она $parity"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment