summaryrefslogtreecommitdiff
path: root/bin/journeuf
blob: 5354dea20b13cb5cfccbd7fae15ed64316a39c5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Ajoute une entrée dans le fichier journal du mois et tag
an=$(date +%Y)
mois=$(date +%m)
jour=$(date +%d)
js=$(LC_TIME=fr_FR.UTF-8 date +%A | awk '{print toupper(substr($0,1,1)) substr($0,2)}')
ms=$(LC_TIME=fr_FR.UTF-8 date +%B | awk '{print toupper(substr($0,1,1)) substr($0,2)}')
file=$(echo "Journal${ms}$an" | noaccent)
if [ -f tags ]; then
	tagline="${an}_${mois}_${jour}	$file	/$js $((0+jour))"
	echo "$tagline" >> tags
	LC_ALL=C sort -o tags -u tags
fi
echo "$js $((0+jour))"