open office word processor, cut first 5 char in each row

Asked by Edward Benson

Dear Ubuntu User:

  Do any one know how to cut first 5 characters in each line(row) in wordprocessor(openOffice) or gedit or vi or
xemacs?

  need your help and thanks a lot in advance, Eric

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Solved by:
Tony Pursell
Solved:
Last query:
Last reply:
Revision history for this message
Best Tony Pursell (ajpursell) said :
#1

Hi Eric

Assuming it is a plain text file, then in a terminal

sed "s/^.....\(.*\)$/\1/g" test.txt > out.txt

where test.txt is the file before first 5 chars are removed and out.txt is the file with first 5 chars removed from each line.

Hope that works for you.

Tony

PS If this answers your question, please mark it as Solved

Revision history for this message
Edward Benson (edward8) said :
#2

Thanks Tony Pursell, that solved my question.