Basic Logic Unexceptional Result

Diaries, I love writing them.

Over the course of 4 years , I wrote about 7000 pieces of notes which included my diaries, random thoughts, my billion dollar ideas.

Quarter of them I got from my old E63, flat html files ( about 1500 of them ), rest of them were downloaded as archive from Awesome Simplenotes & Catch Notes making app which stopped their operations permanently.
I had to get them on track so I migrated everything to evernote.

First 4 files of each of these text file was appended with data relevent to catch.com not me.

So i had to get rid of it.

I ran following script in the folder where these txt files were present.

#!/bin/bash

for i in {1..8000}
do
sed '1,3d' note\ $i.txt > note12\ $i.txt
rm note\ $i.txt
done

Assuming I had to do this entire tedious task by myself, for each file i would have taken atleast 20s minimum. For 7038 files = 20*7038=140760 seconds / 60 = 2346 minutes / 60 = 39.1 hours
By doing research about SED command , bit of scripting basics and final execution, took me less than an hour.

In total I saved 38 hours and I was left with all of my precious notes which will be imported in my new notes app ( evernote, it is )

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Moments