Roger Knecht | 690a1d6 | 2022-09-03 11:34:53 +0000 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
| 3 | cat command |
| 4 | =============== |
| 5 | |
| 6 | Synopsis |
| 7 | -------- |
| 8 | |
| 9 | :: |
| 10 | |
| 11 | cat <interface> <dev[:part]> <file> |
| 12 | |
| 13 | Description |
| 14 | ----------- |
| 15 | |
| 16 | The cat command prints the file content to standard out. |
| 17 | |
| 18 | interface |
| 19 | interface for accessing the block device (mmc, sata, scsi, usb, ....) |
| 20 | |
| 21 | dev |
| 22 | device number |
| 23 | |
| 24 | part |
| 25 | partition number, defaults to 1 |
| 26 | |
| 27 | file |
| 28 | path to file |
| 29 | |
| 30 | Example |
| 31 | ------- |
| 32 | |
| 33 | Here is the output for a example text file: |
| 34 | |
| 35 | :: |
| 36 | |
| 37 | => cat mmc 0:1 hello |
| 38 | hello world |
| 39 | => |
| 40 | |
| 41 | Configuration |
| 42 | ------------- |
| 43 | |
| 44 | The cat command is only available if CONFIG_CMD_CAT=y. |
| 45 | |
| 46 | Return value |
| 47 | ------------ |
| 48 | |
| 49 | The return value $? is set to 0 (true) if the file is readable, otherwise it returns a non-zero error code. |