A
Andry
Hi,
I have a text file captured from an SSH session.
Each line of the text looks like this (opened with VI editor):
***********************************************************************************
-rw-r--r-- 1 root root 2389787 Sep 30 10:45 ^[[00mfilename.pl^[[00m
**********************************************************************************
As you can see a lot of spurious/control/special characters are shown
(in VI editor).
I need to extract just the filenames at the end of each line (getting
rid of spurious characters).
The result should be like this:
***********************************************************************************
filename.pl
***********************************************************************************
Of course, I don't know in advance the value of the string to extract
(nor its length to pass to a "substring" function).
Can you suggest any method to extract the single file name at the end
of each line?
Thank you,
Andrea
I have a text file captured from an SSH session.
Each line of the text looks like this (opened with VI editor):
***********************************************************************************
-rw-r--r-- 1 root root 2389787 Sep 30 10:45 ^[[00mfilename.pl^[[00m
**********************************************************************************
As you can see a lot of spurious/control/special characters are shown
(in VI editor).
I need to extract just the filenames at the end of each line (getting
rid of spurious characters).
The result should be like this:
***********************************************************************************
filename.pl
***********************************************************************************
Of course, I don't know in advance the value of the string to extract
(nor its length to pass to a "substring" function).
Can you suggest any method to extract the single file name at the end
of each line?
Thank you,
Andrea