Using ls, how to list files without printing the extension (the part after the dot)?

bash, ls

Solution

using sed?

ls -1 | sed -e 's/\..*$//'

Problem

Suppose I have a directory with some files: ``` $ ls a.c b.c e.c k.cpp s.java ``` How can I display the result without the file extension(the part following the dot, including that dot)? Like this: ``` $ <some command> a b e k s ```

Original source