Changes to the current address and format carry over to the next command. If an error occurs, the remaining commands are ignored. You can direct the adb debug program to read commands from a text file instead of from the keyboard by redirecting the standard input file when you start the adb program. The file must contain valid adb subcommands. Use the adb program script files when the same set of commands can be used for several different object files.
Scripts can display the contents of core files after a program error.
The following example shows a file containing commands that display information about a program error. When that file is used as input to the adb program using the following command to debug the adbsamp2 file, the specified output is produced. In this format, the Width parameter is an integer that specifies the width in characters of the display. You can give any width convenient for your display device. When the adb program is first invoked, the default width is 80 characters.