Based on the existing commands on your router you can create the script using below commands:
echo 'your script' >> somefile
Put a semicolon at the end of each line for EOL. But you need to have permission to execute the script. use touch command to create file as touch xyz.txt
and see the file permission.