The command to retrieve each protein sequence and save them in individual file (for example, file names ending with .fasta):
fastacmd -d SeqFileName -s NP_524536.1 > 1st.fasta
fastacmd -d SeqFileName -s NP_523624.1 > 2nd.fasta
fastacmd -d SeqFileName -s NP_523822.1 > 3rd.fasta
fastacmd -d SeqFileName -s NP_477425.1 > 4th.fasta
fastacmd -d SeqFileName -s NP_523453.1 > 5th.fasta
The command line to combine the above 5 files into one file, and called the combined file as my.fasta:
cat 1st.fasta 2nd.fasta 3rd.fasta 4th.fasta 5th.fasta >my.fasta