On Linux, what is the easiest way to delete the firstĀ 6 characters of each line in a linux file?
-
-
Answer:
I think... sed 's/^.\{6\}//g' inputfile > outputfile
Mark Harrison at Quora Visit the source
Other answers
colrm 1 6 < InputFile > OutputFile
Sharad Nandanwar
Presuming a file named yourFile.txt, you can use the program cut: cut -c7- yourFile.txt or if you want to save the output in a new file named trimmedFile.txt: cut -c7- yourFile.txt > trimmedFile.txt http://linux.die.net/man/1/cut
Joe Boyle
Related Q & A:
- How to view a linux file?Best solution by Server Fault
- What is the easiest way to play any sound file?Best solution by Stack Overflow
- How to delete a line from a .txt file in node.js?Best solution by c-sharpcorner.com
- What is the easiest way to make a podcast?Best solution by Quora
- What's the easiest way to get a good lightweight BMX bike?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.