SyntaxFix
Write A Post
Hire A Developer
Questions
You can try:
#!/bin/bash d=$(date +%Y-%m-%d) echo "$d"
EDIT: Changed y to Y for 4 digit date as per QuantumFool's comment.