Advertisement

07.13.2008 at 01:44AM PDT, ID: 23560520
[x]
Attachment Details

How do i extract the last 10 characters of every line in a text file?

Asked by zubrzubrzubr in Linux

I'm trying to extract the last 10 characters of every line in a text file by using linux command line using "grep", etc.  

For example, if this is the text file:

abcacbacbac1234567890
abuuuacbac1234567890
abuc1234567890
abcacqqq1234567890
qcbacbac1234567890
gqacbac1234567890




then this should be the output text file:

1234567890
1234567890
1234567890
1234567890
1234567890
1234567890Start Free Trial
[+][-]07.13.2008 at 01:48AM PDT, ID: 21991720

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628