Still on beginner level!
Example of one line in my file.txt
:
158.45.456.756 - - [04/Feb/2016:10:51:24 -0500] "GET /tiles/1.0.0/cd/base/1/85/785.png?wb75678545=75D2503E HTTP/1.1" 200 8848 "http://site/map.html" "Mozilla/5.0 (Windows NT 6.1; MOM64; Trident/7.0; mv:10.0) like Blah"
Result I want to accomplish:
[04/Feb/2016:10:51:24-0500]/tiles/1.0.0/cd/base/1/85/7852008848
What I have tried until now
awk '{ print $4 $5 $7 $9 $10}'
will return:
[04/Feb/2016:10:51:24-0500]/tiles/1.0.0/cd/base/1/85/785.png?wb75678545=75D2503E2008848
which is not good because this part .png?wb75678545=75D2503E
shouldnt be contained in the line.
I also tried just printing 7th column and delete everything after last point with awk '{ print $7}' | grep -Po '.*(?=\.)'
which returned me result that I want for specific column:
/tiles/1.0.0/cd/base/1/85/785
however I end up being left out with other part of the line.
Question
How can I print all the columns I need and in the same time or before edit just 7th column?