67 lines
1.7 KiB
HTML
67 lines
1.7 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=utf-8">
|
|
<title>shift</title>
|
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</HEAD>
|
|
<body bgcolor="#FFFFFF">
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
|
|
|
|
<h2>shift - Shift positional parameters</h2>
|
|
|
|
<strong>Synopsis</strong>
|
|
|
|
<p><strong>shift</strong> [ <em>n</em> ]</p>
|
|
|
|
<p><strong>Description</strong></p>
|
|
|
|
<p>You can use <strong>shift</strong> to shift the positional
|
|
parameters to the left by <em>n.</em> Positional parameter 1 is
|
|
assigned the value of positional parameter (1+<em>n</em>),
|
|
positional parameter 2 is assigned the value of positional
|
|
parameter (2+<em>n</em>), and so forth. The special parameter
|
|
<strong>#</strong> is updated with the new number of positional
|
|
parameters.</p>
|
|
|
|
<p><strong>Options</strong></p>
|
|
|
|
<p>None.</p>
|
|
|
|
<p><strong>Operands</strong></p>
|
|
|
|
<p>The value of <em>n</em> must be an unsigned integer less than or
|
|
equal to the special parameter <strong>#</strong>. If <em>n</em> is
|
|
not specified, the default value is 1. If <em>n</em> is 0, there
|
|
are no changes to the positional parameters.</p>
|
|
|
|
<p><strong>Exit Status</strong></p>
|
|
|
|
<ul>
|
|
<li>0 when successful.</li>
|
|
|
|
<li>>0 when <em>n</em> is invalid.</li>
|
|
</ul>
|
|
|
|
<p><strong>Related information</strong></p>
|
|
|
|
<ul>
|
|
<li><a href="set.htm">set - Set or unset options and positional
|
|
parameters</a></li>
|
|
</ul>
|
|
|
|
<strong>Examples</strong>
|
|
|
|
<ol>
|
|
<li>Shift the positional parameters by two: <strong>shift</strong>
|
|
2</li>
|
|
</ol>
|
|
</body>
|
|
</html>
|
|
|