I wrote a script that reads an input file ('input.txt') that creates
an output file ('output.txt') that massages the data and output it to
be use as a metadata file.
One of the things I'm trying to do (but having problems) is to read a
record in the input file and grab the first letter of the word in the
row to create an index tag only using the 'first' character.
HERE IS A EXAMPLE of my input file and what I would like to create in
my output file. I'm trying to substring the first character without
any luck.
******[ 'input.txt' ]******
Mary
Mike
Joe
Tom
Larry
Dick
James
Paula
Jason
******[ 'output.txt' ]******
category="Index",M
category="Index",M
category="Index",J
category="Index",T
category="Index",L
category="Index",D
category="Index",J
category="Index",P
category="Index",J
For example: when my program reads the first row 'Mary', it will
output 'category="Index",M', and so on, till end of file. Everything
else works good, but having problems is sub-stringing.
Thanks! Bre