From 1cdef63264db6003e47abd6a57f5260db40d6830 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 18 Jan 2014 10:20:22 -0600 Subject: NSH: Improved documentation of the break command --- apps/nshlib/README.txt | 12 +- nuttx/Documentation/NuttShell.html | 219 +++++++++++++++++++++---------------- 2 files changed, 132 insertions(+), 99 deletions(-) diff --git a/apps/nshlib/README.txt b/apps/nshlib/README.txt index cdf7600bf..3d57b7bd2 100644 --- a/apps/nshlib/README.txt +++ b/apps/nshlib/README.txt @@ -117,12 +117,12 @@ Looping Execute as long as has an exit status of zero. - until ; do ; done + until ; do ; done Execute as long as has a non-zero exit status. - A break command is also supported. The break command is only valid + A break command is also supported. The break command is only meaningful within the body of the a while or until loop, between the do and done tokens. If the break command is executed within the body of a loop, the loop will immediately terminate and execution will continue with the @@ -301,6 +301,14 @@ o base64dec [-w] [-f] o base64dec [-w] [-f] +o break + + The break command is only meaningful within the body of the a while or + until loop, between the do and done tokens. Outside of a loop, break + command does nothing. If the break command is executed within the body + of a loop, the loop will immediately terminate and execution will + continue with the next command immediately following the done token. + o cat [ [ ...]] This command copies and concatenates all of the files at diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html index 0be5cf5a0..9e7b1a77c 100644 --- a/nuttx/Documentation/NuttShell.html +++ b/nuttx/Documentation/NuttShell.html @@ -113,277 +113,283 @@
- 2.5 Concatenate Files (cat) + 2.5 Terminate a Loop (break)
- 2.6 Change Current Working Directory (cd) + 2.6 Concatenate Files (cat)
- 2.7 Compare Files (cmp) + 2.7 Change Current Working Directory (cd)
- 2.8 Copy Files (cp) + 2.8 Compare Files (cmp)
- 2.9 Show or set the date and time (date) + 2.9 Copy Files (cp)
- 2.10 Copy and Convert Files (dd) + 2.10 Show or set the date and time (date)
- 2.11 Delete a Routing Table Entry (delroute) + 2.11 Copy and Convert Files (dd)
- 2.12 Show volume status (df) + 2.12 Delete a Routing Table Entry (delroute)
- 2.13 Echo Strings and Variables (echo) + 2.13 Show volume status (df)
- 2.14 Execute User Code (exec) + 2.14 Echo Strings and Variables (echo)
- 2.15 Exit NSH (exit) + 2.15 Execute User Code (exec)
- 2.16 Show Memory Manager Status (free) + 2.16 Exit NSH (exit)
- 2.17 Get File Via TFTP (get) + 2.17 Show Memory Manager Status (free)
- 2.18 Show Usage Command Usage (help) + 2.18 Get File Via TFTP (get)
- 2.19 Hexadecimal Dump of File or Device (hexdump) + 2.19 Show Usage Command Usage (help)
- 2.20 Manage Network Configuration (ifconfig) + 2.20 Hexadecimal Dump of File or Device (hexdump)
- 2.21 Take a network down (ifdown) + 2.21 Manage Network Configuration (ifconfig)
- 2.22 Bring a network up (ifup) + 2.22 Take a network down (ifdown)
- 2.23 Send a signal to a task (kill) + 2.23 Bring a network up (ifup)
- 2.24 Setup/teardown the Loop Device (losetup) + 2.24 Send a signal to a task (kill)
- 2.25 List Directory Contents (ls) + 2.25 Setup/teardown the Loop Device (losetup)
- 2.26 Calculate MD5 (md5) + 2.26 List Directory Contents (ls)
- 2.27 Access Memory (mb, mh, and mw) + 2.27 Calculate MD5 (md5)
- 2.28 Show Current Tasks and Threads (ps) + 2.28 Access Memory (mb, mh, and mw)
- 2.29 Create a Directory (mkdir) + 2.29 Show Current Tasks and Threads (ps)
- 2.30 Create a FAT Filesystem (mkfatfs) + 2.30 Create a Directory (mkdir)
- 2.31 Create a FIFO (mkfifo) + 2.31 Create a FAT Filesystem (mkfatfs)
- 2.32 Create a RAMDISK (mkrd) + 2.32 Create a FIFO (mkfifo)
- 2.33 Mount a File System (mount) + 2.33 Create a RAMDISK (mkrd)
- 2.34 Rename a File (mv) + 2.34 Mount a File System (mount)
- 2.35 Mount an NFS file system (nfsmount) + 2.35 Rename a File (mv)
- 2.36 Check Network Peer (ping) + 2.36 Mount an NFS file system (nfsmount)
- 2.37 Send File Via TFTP (put) + 2.37 Check Network Peer (ping)
- 2.38 Show Current Working Directory (pwd) + 2.38 Send File Via TFTP (put)
- 2.39 Remove a File (rm) + 2.39 Show Current Working Directory (pwd)
- 2.40 Remove a Directory (rmdir) + 2.40 Remove a File (rm)
- 2.41 Set an Environment Variable (set) + 2.41 Remove a Directory (rmdir)
- 2.42 Execute an NSH Script (sh) + 2.42 Set an Environment Variable (set)
- 2.43 Wait for Seconds (sleep) + 2.43 Execute an NSH Script (sh)
- 2.44 Unmount a File System (umount) + 2.44 Wait for Seconds (sleep)
- 2.45 Unset an Environment Variable (unset) + 2.45 Unmount a File System (umount)
- 2.46 URL Decode (urldecode) + 2.46 Unset an Environment Variable (unset)
- 2.47 URL Encode (urlencode) + 2.47 URL Decode (urldecode)
- 2.48 Wait for Microseconds (usleep) + 2.48 URL Encode (urlencode)
- 2.49 Get File Via HTTP (wget) + 2.49 Wait for Microseconds (usleep)
- 2.50 Hexadecimal Dump of Memory (xd) + 2.50 Get File Via HTTP (wget) + + + +
+ + 2.51 Hexadecimal Dump of Memory (xd) @@ -639,7 +645,7 @@ done Execute [sequence of <cmd>] as long as <cmd> has a non-zero exit status. The syntax is as follows:
    -while <cmd>
    +until <cmd>
     do
       [sequence of <cmd>]
     done
    @@ -648,9 +654,9 @@ done
       
     
-

The break Command. - A break command is also supported. - The break command is only valid within the body of the a while or until loop, between the do and done tokens. +

The break Command. + A break command is also supported. + The break command is only meaningful within the body of the a while or until loop, between the do and done tokens. If the break command is executed within the body of a loop, the loop will immediately terminate and execution will continue with the next command immediately following the done token.

@@ -962,7 +968,26 @@ base64enc [-w] [-f] <string or filepath> + +
-

2.5 Concatenate Files (cat)

+

2.5 Terminate a Loop (break)

+
+ +

Command Syntax:

+
    +break
    +
+

+ Synopsis. + The break command is only meaningful within the body of the a while or until loop, between the do and done tokens. + Outside of a loop, break command does nothing. + If the break command is executed within the body of a loop, the loop will immediately terminate and execution will continue with the next command immediately following the done token. +

+ + + +
+

2.6 Concatenate Files (cat)

@@ -980,7 +1005,7 @@ cat <path> [<path> [<path> -

2.6 Change Current Working Directory (cd)

+

2.7 Change Current Working Directory (cd)

@@ -1022,7 +1047,7 @@ cd [<dir-path>|-|~|..]
-

2.7 Compare Files (cmp)

+

2.8 Compare Files (cmp)

@@ -1039,7 +1064,7 @@ cmp <path1> <path2>
-

2.8 Copy Files (cp)

+

2.9 Copy Files (cp)

@@ -1057,7 +1082,7 @@ cp <source-path> <dest-path>
-

2.9 Show or set the date and time (date)

+

2.10 Show or set the date and time (date)

@@ -1084,7 +1109,7 @@ data -s "Sep 1 11:30:00 2011"
-

2.10 Copy and Convert Files (dd)

+

2.11 Copy and Convert Files (dd)

@@ -1142,7 +1167,7 @@ nsh> dd if=/dev/ram0 of=/dev/null
-

2.11 Delete a Routing Table Entry (delroute)

+

2.12 Delete a Routing Table Entry (delroute)

@@ -1165,7 +1190,7 @@ nsh> delroute 1.1.1.1 2.2.2.2
-

2.12 Show Volument Status (df)

+

2.13 Show Volument Status (df)

@@ -1197,7 +1222,7 @@ nsh>
-

2.13 Echo Strings and Variables (echo)

+

2.14 Echo Strings and Variables (echo)

@@ -1215,7 +1240,7 @@ echo [<string|$name> [<string|$name>...]]
-

2.14 Execute User Code (exec)

+

2.15 Execute User Code (exec)

@@ -1234,7 +1259,7 @@ exec <hex-address>
-

2.15 Exit NSH (exit)

+

2.16 Exit NSH (exit)

@@ -1253,7 +1278,7 @@ exit
-

2.16 Show Memory Manager Status (free)

+

2.17 Show Memory Manager Status (free)

@@ -1295,7 +1320,7 @@ nsh>
-

2.17 Get File Via TFTP (get)

+

2.18 Get File Via TFTP (get)

@@ -1330,7 +1355,7 @@ get [-b|-n] [-f <local-path>] -h <ip-address> <remote-path>
-

2.18 Show Usage Command Usage (help)

+

2.19 Show Usage Command Usage (help)

@@ -1362,7 +1387,7 @@ help [-v] [<cmd>]
-

2.19 Hexadecimal Dump of File or Device (hexdump)

+

2.20 Hexadecimal Dump of File or Device (hexdump)

@@ -1386,7 +1411,7 @@ hexdump <file or device>
-

2.20 Manage Network Configuration (ifconfig)

+

2.21 Manage Network Configuration (ifconfig)

@@ -1440,7 +1465,7 @@ ifconfig nic_name ip_address
-

2.21 Take a network down (ifdown)

+

2.22 Take a network down (ifdown)

@@ -1463,7 +1488,7 @@ ifdown eth0
-

2.22 Bring a network up (ifup)

+

2.23 Bring a network up (ifup)

@@ -1486,7 +1511,7 @@ ifup eth0
-

2.23 Send a signal to a task (kill)

+

2.24 Send a signal to a task (kill)

@@ -1527,7 +1552,7 @@ nsh>
-

2.24 Setup/teardown the Loop Device (losetup)

+

2.25 Setup/teardown the Loop Device (losetup)

@@ -1580,7 +1605,7 @@ losetup d <dev-path>
-

2.25 List Directory Contents (ls)

+

2.26 List Directory Contents (ls)

@@ -1617,7 +1642,7 @@ ls [-lRs] <dir-path>
-

2.26 Calculate MD5 (md5)

+

2.27 Calculate MD5 (md5)

@@ -1634,7 +1659,7 @@ md5 [-f] <string or filepath>
-

2.27 Access Memory (mb, mh, and mw)

+

2.28 Access Memory (mb, mh, and mw)

@@ -1688,7 +1713,7 @@ nsh>
-

2.28 Show Current Tasks and Threads (ps)

+

2.29 Show Current Tasks and Threads (ps)

@@ -1714,7 +1739,7 @@ nsh>
-

2.29 Create a Directory (mkdir)

+

2.30 Create a Directory (mkdir)

@@ -1749,7 +1774,7 @@ nsh>
-

2.30 Create a FAT Filesystem (mkfatfs)

+

2.31 Create a FAT Filesystem (mkfatfs)

@@ -1774,7 +1799,7 @@ mkfatfs [-F <fatsize>] <block-driver>
-

2.31 Create a FIFO (mkfifo)

+

2.32 Create a FIFO (mkfifo)

@@ -1812,7 +1837,7 @@ nsh>
-

2.32 Create a RAMDISK (mkrd)

+

2.33 Create a RAMDISK (mkrd)

@@ -1863,7 +1888,7 @@ nsh>
-

2.33 Mount a File System (mount)

+

2.34 Mount a File System (mount)

@@ -1942,7 +1967,7 @@ nsh> mount
-

2.34 Rename a File (mv)

+

2.35 Rename a File (mv)

@@ -1960,7 +1985,7 @@ mv <old-path> <new-path>
-

2.35 Mount an NFS file system (nfsmount)

+

2.36 Mount an NFS file system (nfsmount)

@@ -1979,7 +2004,7 @@ nfsmount <server-address> <mount-point> <remote-path>
-

2.36 Check Network Peer (ping)

+

2.37 Check Network Peer (ping)

@@ -2012,7 +2037,7 @@ nsh>
-

2.37 Send File Via TFTP (put)

+

2.38 Send File Via TFTP (put)

@@ -2047,7 +2072,7 @@ put [-b|-n] [-f <remote-path>] -h <ip-address> <local-path>
-

2.38 Show Current Working Directory (pwd)

+

2.39 Show Current Working Directory (pwd)

@@ -2077,7 +2102,7 @@ nsh>
-

2.39 Remove a File (rm)

+

2.40 Remove a File (rm)

@@ -2111,7 +2136,7 @@ nsh>
-

2.40 Remove a Directory (rmdir)

+

2.41 Remove a Directory (rmdir)

@@ -2146,7 +2171,7 @@ nsh>
-

2.41 Set an Environment Variable (set)

+

2.42 Set an Environment Variable (set)

@@ -2172,7 +2197,7 @@ nsh>
-

2.42 Execute an NSH Script (sh)

+

2.43 Execute an NSH Script (sh)

@@ -2190,7 +2215,7 @@ sh <script-path>
-

2.43 Wait for Seconds (sleep)

+

2.44 Wait for Seconds (sleep)

@@ -2207,7 +2232,7 @@ sleep <sec>
-

2.44 Unmount a File System (umount)

+

2.45 Unmount a File System (umount)

@@ -2237,7 +2262,7 @@ nsh>
-

2.45 Unset an Environment Variable (unset)

+

2.46 Unset an Environment Variable (unset)

@@ -2263,7 +2288,7 @@ nsh>
-

2.46 URL Decode (urldecode)

+

2.47 URL Decode (urldecode)

@@ -2280,7 +2305,7 @@ urldecode [-f] <string or filepath>
-

2.47 URL Encode (urlencode)

+

2.48 URL Encode (urlencode)

@@ -2297,7 +2322,7 @@ urlencode [-f] <string or filepath>
-

2.48 Wait for Microseconds (usleep)

+

2.49 Wait for Microseconds (usleep)

@@ -2314,7 +2339,7 @@ usleep <usec>
- 2.49 Get File Via HTTP (wget) + 2.50 Get File Via HTTP (wget)
@@ -2341,7 +2366,7 @@ wget [-o <local-path>] <url>
-

2.50 Hexadecimal Dump of Memory (xd)

+

2.51 Hexadecimal Dump of Memory (xd)

@@ -4011,7 +4036,7 @@ mount -t vfat /dev/ram1 /tmp
  • Background commands
  • Background command priority
  • binfs
  • -
  • break
  • +
  • break
  • Built-In applications
  • Built-In application start-up main()
  • Built-in variables
  • -- cgit v1.2.3