1.

Solve : prefix each line in a txt file with a value?

Answer»

I have searched QUITE a few topics and haven't seen ANYTHING which seems to meet my REQUIREMENTS......

objective - read every record in a txt file and prefix it with a variable..

1. set a variable (XXX) to the current TIME
2. read the txt file
3. write to a new txt file PREFIXING the output record with XXXYou probably won't find an exact solution. You'll need to write a script.

1. set a variable equal to the current time.

2. In a loop:

a. Read every "record" (do you mean every line?) in the text file
b. Prepend the time variable to the line and
c. Write it out to the new file.



Discussion

No Comment Found