dots


commit
5ad84fb
parent
27840b5
author
xxwhirlpool
date
2025-10-22 19:01:12 -0400 EDT
fix today script
1 files changed,  +7, -12
M config/.local/bin/today
+7, -12
 1@@ -1,17 +1,12 @@
 2 #!/usr/bin/env bash
 3-#
 4+
 5 # current date in ISO format
 6+if [ $# -eq 0 ]; then
 7+	echo -e "$(date '+%Y-%m-%d')"
 8+fi
 9 
10 # if you also want time then supply `time` arg:
11 # today time
12-today() {
13-	if [ $# -eq 0 ]; then
14-		echo -e "$(date '+%Y-%m-%d')"
15-	fi
16-
17-	if [ "$1" == "time" ]; then
18-		echo -e "$(date '+%Y-%m-%d_%I:%M%p')"
19-	fi
20-}
21-
22-today
23+if [ "$1" == "time" ]; then
24+	echo -e "$(date '+%Y-%m-%d_%I:%M%p')"
25+fi