Dear Liu.
The grep command which Igave you exactly does what log2txt.py. Try this
Search for grep -A option and pipes in linux.
The command which I gave you:
“grab the 5001 lines that appear after “step” and put that (or pipe it) in to log.txt”
This is what pizza.py does.
This is not a lammps related question at all.
So please put an effort to atleast take the suggestions which people give on the forum.
This will be my last e-mail in this issue.
Good luck
Arun