could there be hidden tabs in the logs that have to be accurately copied? how would you see them?
That could be.
You could use the od
command to check: head -5 infile | od -t c
For example, I created a file (infile) with 2 lines:
$ cat infile
Using the od command on that infile gives the following:
$ head -2 infile | od -t c
0000000 s p a c e : ( s p a c e ) \n t
0000020 a b : \t ( t a b ) \n
A tab shows up as \t
and a space is just that (an empty spot). The \n indicates an end of line.
I also use the head -2 infile
part to only show the first 2 lines (could be of use if the infile is rather large)
Depending on where the tab is present, you might have to edit the sed command to include this tab. But this is only needed if the tab character is in the first part of the line (In this part: floppyrecords.co.uk: [01/Nov/2006:00:06:55 +0000] 18.104.22.168 - -
). Everything after and including "GET....... is taken care of in the sed statement.
If anything is still unclear, just ask
Hope this helps.