Update NSH documentation to include basename and dirname
This commit is contained in:
parent
e4d0255c14
commit
c07b1db85f
@ -8,7 +8,7 @@
|
||||
<tr align="center" bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<h1><big><font color="#3c34ec"><i>NuttShell (NSH)</i></font></big></h1>
|
||||
<p>Last Updated: July 13, 2015</p>
|
||||
<p>Last Updated: November 23, 2015</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -110,6 +110,12 @@
|
||||
<a href="#cmdbase64enc">2.4 Base64 Encode (base64enc)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmdbasename">2.5 Extract Base File/Directory Name (basename)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
@ -164,6 +170,12 @@
|
||||
<a href="#cmddf">2.13 Show volume status (df)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<a href="#cmddirname">2.14 Extract Path to a File/Directory (dirname)</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
@ -1083,6 +1095,23 @@ base64enc [-w] [-f] <string or filepath>
|
||||
<i>To be provided.</i>
|
||||
</p>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmdbasename"><h2>2.5 Extract Base File/Directory Name (basename)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p><b>Command Syntax:</b></p>
|
||||
<ul><pre>
|
||||
basename <path> [<suffix>]
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Synopsis</b>.
|
||||
Extract the final string from a <code><path></code> by removing the preceding path
|
||||
segments and (optionally) removing any trailing <code><suffix></code>.
|
||||
<p>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
@ -1336,6 +1365,23 @@ nsh>
|
||||
If <code>CONFIG_NSH_CMDOPT_DF_H</code> is defined in the NuttX configuration, then the <code>df</code> will also support an option <code>-h</code> which may be used to show the volume information in <i>human readable</i> format.
|
||||
</p>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<a name="cmddirname"><h2>2.14 Extract Path to a File/Directory (dirname)</h2></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p><b>Command Syntax:</b></p>
|
||||
<ul><pre>
|
||||
dirname <path>
|
||||
</pre></ul>
|
||||
<p>
|
||||
<b>Synopsis</b>.
|
||||
Extract the path string leading up to the full <code><path></code> by removing
|
||||
the final directory or file name.
|
||||
<p>
|
||||
|
||||
<table width ="100%">
|
||||
<tr bgcolor="#e4e4e4">
|
||||
<td>
|
||||
@ -2720,6 +2766,11 @@ nsh>
|
||||
<td><code>CONFIG_NETUTILS_CODECS</code> && <code>CONFIG_CODECS_BASE64</code></td>
|
||||
<td><code>CONFIG_NSH_DISABLE_BASE64ENC</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><code>basename</code></b></td>
|
||||
<td> </td>
|
||||
<td><code>CONFIG_NSH_DISABLE_BASENAME</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><code>break</code></b></td>
|
||||
<td>!<code>CONFIG_NSH_DISABLESCRIPT</code> && !<code>CONFIG_NSH_DISABLE_LOOPS</code></td>
|
||||
@ -2765,6 +2816,11 @@ nsh>
|
||||
<td>!<code>CONFIG_DISABLE_MOUNTPOINT</code> && <code>CONFIG_NFILE_DESCRIPTORS</code> > 0 && <code>CONFIG_FS_READABLE</code><sup>3</sup></td>
|
||||
<td><code>CONFIG_NSH_DISABLE_DF</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><code>dirname</code></b></td>
|
||||
<td> </td>
|
||||
<td><code>CONFIG_NSH_DISABLE_DIRNAME</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b><code>echo</code></b></td>
|
||||
<td><br></td>
|
||||
@ -4359,6 +4415,7 @@ mount -t vfat /dev/ram1 /tmp
|
||||
<li><a href="#custapps"><code>builtin_proto.h</code></a></li>
|
||||
<li><a href="#cmdbase64dec"><code>base64dec</code></a></li>
|
||||
<li><a href="#cmdbase64enc"><code>base64enc</code></a></li>
|
||||
<li><a href="#cmdbasename"><code>basename</code></a></li>
|
||||
<li><a href="#cmdcat"><code>cat</code></a></li>
|
||||
<li><a href="#cmdcd"><code>cd</code></a></li>
|
||||
<li><a href="#cmdcmp"><code>cmp</code></a></li>
|
||||
@ -4432,6 +4489,7 @@ mount -t vfat /dev/ram1 /tmp
|
||||
<li><a href="#cmddd"><code>dd</code></a></li>
|
||||
<li><a href="#cmdaddroute"><code>delroute</code></a></li>
|
||||
<li><a href="#cmddf"><code>df</code></a></li>
|
||||
<li><a href="#cmddirname"><code>dirname</code></a></li>
|
||||
<li><a href="#looping"><code>do</code></a></li>
|
||||
<li><a href="#looping"><code>done</code></a></li>
|
||||
<li><a href="#cmdecho"><code>echo</code></a></li>
|
||||
|
Loading…
Reference in New Issue
Block a user