If you're using bash as a shell, this is a simple task for a shell pipeline.
ls | grep '\.out$' | while read file; do echo mv "$file" "${file%.*}"; done
ls
produces a list of files in the directory.
grep '\.out$'
extracts the filenames that end in .out and discards the rest.
while read file
reads the filenames one at a time.
echo mv "$file" "${file%.*}"
displays but does not run a mv command that would rename each file to a version without its extension. The ${file%.*}
business is bash syntax for stripping off a file extension. When you're satisfied that the pipeline would do what you wanted if it were run for real, remove the echo
part and let it run for real.
ls | grep '\.out$' | while read file; do mv "$file" "${file%.*}"; done
program.out
in the script anyways.