In bash, I want to search a directory which contains a file that I'm expecting:
find . -name "myfile-*.war"
assign the name of this file to a variable, and then rename the file to newfile.war.
You don't need to assign the file to a variable, just rename it with the -execdir option to find:
find . -name 'myfile-*.var' -execdir mv {} newfile.war \;
find's working directory?-execdir so it runs the command inside the directory of the file.
find?newfile.war?