Linux

Using sed, extract the date from the following line: 201.7.19.90 - - [05/Jun/1985:13:42:99 +0000] "GET /site HTTP/1.1" 200 32421

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

echo $line | sed 's/.*\[//g;s/].*//g;s/:.*//g'