On Fri, 2007-10-12 at 17:15 -0400, Marko A. Jennings wrote: > On Fri, October 12, 2007 4:54 pm, roland hellström wrote: > ><snip> > Assuming that you have those lines in a file called numbers.txt, you can > execute the following (all on one line): > > cat numbers.txt | tr '.,e' ',^^' | awk -F^ '{printf("%s & $%s \\cdot > 10^{%s}$\\\\\n", $1, $2, $3);}' Just a reminder from an old anal-retentive: the creation of the extra process (for cat) and the creation of a pipe is not needed. Use the standard input redirection available in bash. tr .... < numbers.txt will do the job. > <snip> -- Bill