Description
For simplicity, we assume that a word is a sequence of lowercase alphabets. You can extend the regular expressions used in the scripts to match POSIX-defined words.

The job to do is reversing every word of a line.
Raw Input Desired Output
112358 is a fibonacci sequence...
a test line
124816 1392781
final line...
112358 si a iccanobif ecneuqes...
a tset enil
124816 1392781
lanif enil...
Script and Comments
Script1
[ 1] s/[a-z][a-z]*/\n&/g
[ 2] :loop
[ 3] s/([a-z]*\n)([a-z])([a-z]*)/\2\1\3/g
[ 4] t loop
[ 5] s/\n//g
Comments
  1. The `-r' option of GNU sed must be used or you have to escape every parenthesis.
  2. Step [1] is used to insert a newline character before every word of a line.
  3. Steps [2] thru [4] constitute a loop where each iteration will move the character after the newline character of every word to the beginning of it.
  4. For example, the process of reversing `abcd' is as follows:
    abcd
    \nabcd
    a\nbcd
    ba\ncd
    cba\nd
    dcba\n