Q:

List only files in a directory and show the inode number

How can I list all files but not directories in a given directory and show the inode-numbers. 
Something like ls -li | grep ^- does not work since the inode number is shown in the beginning of the line.

A:

There are multiple solutions.  Assuming you do not have a filename starting with -
ls -li | grep " -"
ls -li | awk '/ -/'

If a directory contains -, it can be fixed by
ls -li | grep "[0-9][0-9]* -"
ls -li | awk '$2 ~ "-.{9}"'

