How To Manipulate Strings In Bash On Linux
Manipulating strings in Bash on Linux can be a challenge, but there are a few tricks that can help. Here are three tips: Use the strftime() function to get the time of day. strftime("%Y-%M-%D", 1) # strftime("%H:%M:%S") Use the date() function to get the current date and time. date -d “2006-12-15” # date -u “2006-12-15” # date +’ ’ #date -m “2006-12-15’ ' Use the cut() and copy() functions to cut and copy strings....