Wow, really? While that will still work for a lot of equipment, the write command has been deprecated for over a decade now. It no longer exists in some newer equipment, including Nexus switches.
Unless you have equipment running IOS 10 or older, you should use copy running-config startup-config (or copy run start) instead.
If you do have equipment running IOS 10 or older, you should replace it, and then use copy running-config startup-config (or copy run start) instead.