PaulDotCom mailing list archives

Advice: Bash Scripting


From: arch3angel at gmail.com (Arch Angel)
Date: Sat, 1 Nov 2008 06:07:36 -0500

Hello Everyone,

I have a project to help me study for certifications, by taking PDF files
and converting those into text files, then from text files create a csv
file, which in turn will be imported into jMemorize (http://jmemorize.org/).
I know this seems like a great bit of work, but using flash card style
studying helps me a great deal as well as others who can use the same data
once it is created.  I am looking for some help in making the text file to a
cvs file via a script.  I can make the PDF into a text real easy, extract
the garage to leave the just the questions and answers, but from this point
it is manual copy paste which I want to try and avoid.

Now reading through the jMemorize website and playing with the file contents
I was able to find that the jMemorize application exports the questions into
a cvs file and when opened in say notepad++ I get the following for each
question:

"QUESTION 02: Which configuration command correctly sets the encapsulation
type for a PPP over ATM interface?

A. encapsulation ppp
B. encapsulation pppoa
C. encapsulation aa15mux
D. encapsulation aa15snap","Answer: A

A. encapsulation ppp","Juniper_JNCIA_ActualTests_JN0-120_05-25-2007",0

This was an example of the original text file entry:

QUESTION 2: Which configuration command correctly sets the encapsulation
type for a PPP over ATM interface?

A. Encapsulation ppp
B. Encapsulation pppoa
C. Encapsulation aa15mux
D. Encapsulation aa15snap

Answer: A

Is it possible to create a script that will add a " before the QUESTION and
then add a "," before the Answer with a " at the end of the Answer line?

If I could execute this script it would save me hours of time creating these
databases for flashcards and in turn help me pass my certifications.

Thanks ahead of time for all the help and advice!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pauldotcom.com/pipermail/pauldotcom/attachments/20081101/5a3baed4/attachment.htm 


Current thread: