python - Remove lines from file -


I am a text processing on a Unix system. I have used the command line on the machine and Python, Perl is installed and the default text processing progams, awk, etc.

I feel like a text file below.

  2029754527851451717 2029754527851451717 2029754527851451717 2029754527851451717 2029754527851451717 2029754527851451717 1232453488239 Tue Marc 3 10:47:44 2009 2029754527851451717 1232453488302 Tue Marc 3 10:47:44 2009 2029754527851451717 1232453488365 Tue Marc 3 10:47:44 2009 2895635937120524206 2895635937120524206 2895635937120524206 2895635937120524206 2895635937120524206 2895635937120524206 5622983575622325494 1232453323986 Thu Feb, 12 15:57:49 2009  

this is basically 3 lines: id date

I have all the lines 2 ID I'm not looking to remove that and finishing a date will result in this like this:

  202 9754527851451717 1232453488239 Tue Marc 3 10:47:44 2009 2029754527851451717 1232453488302 Tue Marc 3 10:47:44 2009 2029754527851451717 1232453488365 Tue March 3 10:47: 44 2009 5,622,983,575,622,325,494th 1232453323986 Thu Feb, 12 15:57:49 2009  < / Pre> 

How would you guys suggest doing this? The text file in the total is approximately 30,000 lines long.

Cheers

EEF

awk < / Code> with:

  awk 'nf & gt; 2 'input_file' & gt; Output_file  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -