How do i send the output from the date command to a variable called today easy:
today=$(date) but how can the output be capitalized on a single command ?
Using parameter expansion in bash 4.x
today=$(date)
today="${today^^}"
1 Like
In a single command:
today=$( date | tr "[a-z]" "[A-Z]" )
1 Like