For some strange reason my file is split by the character. I didn't choose the character, and it is, at the moment, unlikely to change. In Unix the character appears as ^[ inside a file, but any time I run attempt to run a command on the line to split the character, it deletes the character after the ^[ and fails to even find a ^[.
Line appears as follows. With the ^[ representing the character above.
123456^[SomeString^[AnotherString^[0.00000 sec
I am attempting to get the time before the sec, but so far my commands have failed because character tends to delete the first number before the .
My string ends up
123456omeString notherString.00 000 sec
The Strings may contain * characters, Spaces, and Underscores making it difficult to split.
and I can not retrieve the correct number of seconds.
Standard Unix awk, grep, and other commands have been attempted.
Attempts to use Perl's Regular expression on just the ^ return no results
splitting on \[ also produces no results.
If Anyone can offer some help, it would be appreciated.
Edit:::
(I've noticed the Character doesn't appear at all in the forum either...how fun. It looks a bit like this <- )
Line appears as follows. With the ^[ representing the character above.
123456^[SomeString^[AnotherString^[0.00000 sec
I am attempting to get the time before the sec, but so far my commands have failed because character tends to delete the first number before the .
My string ends up
123456omeString notherString.00 000 sec
The Strings may contain * characters, Spaces, and Underscores making it difficult to split.
and I can not retrieve the correct number of seconds.
Standard Unix awk, grep, and other commands have been attempted.
Attempts to use Perl's Regular expression on just the ^ return no results
Code:
@cutline = split(/\^/, $line, 5);
If Anyone can offer some help, it would be appreciated.
Edit:::
(I've noticed the Character doesn't appear at all in the forum either...how fun. It looks a bit like this <- )
Comment