Write a shell script to display the calendar for current month with current date replaced by * or ** depending on whether the date has one digit or two in unix/linux
if (( $(date "+%d") <= 9 ))
then
cal|sed -r "s/\b$(date "+%d")\b/*/"
else
cal|sed -r "s/\b$(date "+%d")\b/**/"
fi
Post a Comment
If you have any doubts, Please let me know
Thanks!