Files
doc-exports/docs/dataartsstudio/umn/dataartsstudio_01_0425.html
chenxiaoxiong f9e2808b7c DataArts UMN 20250810 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
2025-09-02 10:44:13 +00:00

130 lines
29 KiB
HTML

<a name="dataartsstudio_01_0425"></a><a name="dataartsstudio_01_0425"></a>
<h1 class="topictitle1">Developing a Shell Script</h1>
<div id="body8662426"><p id="dataartsstudio_01_0425__en-us_topic_0114018164_p10585743354">DataArts Factory allows you to develop, debug, and run Shell scripts online. You can run developed scripts in <span id="dataartsstudio_01_0425__text990451266">job</span>s. For details, see <a href="dataartsstudio_01_0435.html">Developing a Pipeline Job</a>.</p>
<div class="section" id="dataartsstudio_01_0425__en-us_topic_0114018164_section536330414847"><h4 class="sectiontitle">Prerequisites</h4><ul id="dataartsstudio_01_0425__en-us_topic_0114018164_ul26702399271"><li id="dataartsstudio_01_0425__en-us_topic_0114018164_li94842042182716">A shell script has been added. For details, see <a href="dataartsstudio_01_0423.html">Creating a Script</a>.</li><li id="dataartsstudio_01_0425__en-us_topic_0114018164_li181684132718">A host connection has been created. The Linux host is used to execute shell scripts. For details, see <a href="dataartsstudio_01_1305.html">Host Connection Parameters</a>.</li><li id="dataartsstudio_01_0425__li182791352142917">You have the permission to create and execute files in the <strong id="dataartsstudio_01_0425__b84586912349">/tmp</strong> directory on the host.</li><li id="dataartsstudio_01_0425__li716610317542">The maximum number of shell or Python scripts that can run concurrently on the ECS is determined by the value of <strong id="dataartsstudio_01_0425__en-us_topic_0000001503446532_b744231917314">MaxSessions</strong> in the <strong id="dataartsstudio_01_0425__en-us_topic_0000001503446532_b18801517103811">/etc/ssh/sshd_config</strong> file on the ECS. Set <strong id="dataartsstudio_01_0425__en-us_topic_0000001503446532_b1357831103217">MaxSessions</strong> based on the scheduling frequency of shell or Python scripts.</li><li id="dataartsstudio_01_0425__li1333514911">You have locked the script. Otherwise, you must click <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b7781145941616">Lock</strong> so that you can develop the script. A script you create or import is locked by you by default. For details, see the <a href="dataartsstudio_01_0912.html">lock function</a>.</li></ul>
</div>
<div class="section" id="dataartsstudio_01_0425__en-us_topic_0114018164_section1916401114318"><h4 class="sectiontitle">Procedure</h4><ol id="dataartsstudio_01_0425__ol6188355205416"><li id="dataartsstudio_01_0425__li2848154165110">Log in to the <span id="dataartsstudio_01_0425__en-us_topic_0000001987511677_en-us_topic_0000001127311125_text5574448155719">DataArts Studio</span> console by following the instructions in <a href="dataartsstudio_01_0001.html">Accessing the DataArts Studio Instance Console</a>.</li><li id="dataartsstudio_01_0425__li10888120591">On the <span id="dataartsstudio_01_0425__en-us_topic_0181092879_text185611381448">DataArts Studio</span> console, locate a workspace and click <strong id="dataartsstudio_01_0425__en-us_topic_0181092879_b65382814249">DataArts Factory</strong>.</li><li id="dataartsstudio_01_0425__li6576131765420">In the left navigation pane of DataArts Factory, choose <span class="menucascade" id="dataartsstudio_01_0425__en-us_topic_0181092879_en-us_topic_0104967364_menucascade1889024114211"><b><span class="uicontrol" id="dataartsstudio_01_0425__en-us_topic_0181092879_en-us_topic_0104967364_uicontrol88905411627"><span id="dataartsstudio_01_0425__en-us_topic_0181092879_en-us_topic_0104967364_text6890114118213">Data Development</span></span></b> &gt; <b><span class="uicontrol" id="dataartsstudio_01_0425__en-us_topic_0181092879_en-us_topic_0104967364_uicontrol1189017411422"><span id="dataartsstudio_01_0425__en-us_topic_0181092879_en-us_topic_0104967364_text18901411529">Develop Script</span></span></b></span>.</li><li id="dataartsstudio_01_0425__li17188105512548">In the script directory list, double-click a script that you want to develop. The script development page is displayed.</li><li id="dataartsstudio_01_0425__li218885516547">In the upper part of the editor, select script properties. <a href="#dataartsstudio_01_0425__en-us_topic_0114018164_table5350135013499">Table 1</a> describes the script properties.
<div class="tablenoborder"><a name="dataartsstudio_01_0425__en-us_topic_0114018164_table5350135013499"></a><a name="en-us_topic_0114018164_table5350135013499"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0425__en-us_topic_0114018164_table5350135013499" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Shell script properties</caption><thead align="left"><tr id="dataartsstudio_01_0425__en-us_topic_0114018164_row135045064917"><th align="left" class="cellrowborder" valign="top" width="20.200000000000003%" id="mcps1.3.3.2.5.2.2.3.1.1"><p id="dataartsstudio_01_0425__en-us_topic_0114018164_p13350175044916">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="79.80000000000001%" id="mcps1.3.3.2.5.2.2.3.1.2"><p id="dataartsstudio_01_0425__en-us_topic_0114018164_p9350145014913">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0425__en-us_topic_0114018164_row14812567293"><td class="cellrowborder" valign="top" width="20.200000000000003%" headers="mcps1.3.3.2.5.2.2.3.1.1 "><p id="dataartsstudio_01_0425__en-us_topic_0114018164_p779714043012">Host Connection</p>
</td>
<td class="cellrowborder" valign="top" width="79.80000000000001%" headers="mcps1.3.3.2.5.2.2.3.1.2 "><p id="dataartsstudio_01_0425__en-us_topic_0114018164_p24817565292">Selects the host where a shell script is to be executed.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="dataartsstudio_01_0425__p14489104013818">Click <strong id="dataartsstudio_01_0425__b16746191520512">Input Parameters</strong> and enter the parameter and interactive parameter for executing the shell script.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0425__table119955716390" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Shell script parameters</caption><thead align="left"><tr id="dataartsstudio_01_0425__row7199105713395"><th align="left" class="cellrowborder" valign="top" width="20.25%" id="mcps1.3.3.2.5.4.2.3.1.1"><p id="dataartsstudio_01_0425__p619995720394">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="79.75%" id="mcps1.3.3.2.5.4.2.3.1.2"><p id="dataartsstudio_01_0425__p1719920572393">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0425__row10200165713916"><td class="cellrowborder" valign="top" width="20.25%" headers="mcps1.3.3.2.5.4.2.3.1.1 "><p id="dataartsstudio_01_0425__p10308828124218">Parameter</p>
</td>
<td class="cellrowborder" valign="top" width="79.75%" headers="mcps1.3.3.2.5.4.2.3.1.2 "><p id="dataartsstudio_01_0425__p103081282428">Parameter transferred to the Shell script when it is executed. Parameters are separated by spaces, for example, <strong id="dataartsstudio_01_0425__b19867103914016">a b c</strong>.</p>
<p id="dataartsstudio_01_0425__p4308628204215">The parameter must be referenced by a location variable (for example, $1, $2, or $3) in the Shell script. Otherwise, the parameter is invalid. The location variable starts from 0. Variable 0 is reserved for storing the actual script name, variable 1 corresponds to the first parameter of the script, and so on. For example, $1, $2, and $3 reference parameters <strong id="dataartsstudio_01_0425__b3775019144616">a</strong>, <strong id="dataartsstudio_01_0425__b13299102113462">b</strong>, and <strong id="dataartsstudio_01_0425__b10439162316464">c</strong>, respectively.</p>
<p id="dataartsstudio_01_0425__p1930813284426">Note: If a variable is referenced in the shell script, use the <em id="dataartsstudio_01_0425__i167511455171717">$args</em> format instead of the <em id="dataartsstudio_01_0425__i1884518051811">${args}</em> format. Otherwise, the variable will be replaced by a parameter with the same name in the job.</p>
<p id="dataartsstudio_01_0425__p1230892834218">For example, if you enter <strong id="dataartsstudio_01_0425__b13701453104415">a b c</strong> and run the following Shell script, <strong id="dataartsstudio_01_0425__b18813184164513">b</strong> is displayed:</p>
<pre class="screen" id="dataartsstudio_01_0425__screen1730920286427">echo $2</pre>
</td>
</tr>
<tr id="dataartsstudio_01_0425__row32005579391"><td class="cellrowborder" valign="top" width="20.25%" headers="mcps1.3.3.2.5.4.2.3.1.1 "><p id="dataartsstudio_01_0425__p630992818421">Interactive Parameter</p>
</td>
<td class="cellrowborder" valign="top" width="79.75%" headers="mcps1.3.3.2.5.4.2.3.1.2 "><p id="dataartsstudio_01_0425__p630912814424">Interactive information (for example, passwords) provided during shell script execution. Interactive parameters are separated by spaces. The shell script reads parameter values in sequence according to the interaction situation.</p>
<p id="dataartsstudio_01_0425__p3309928134218">For example, run the following interactive Shell script. Interaction parameters <strong id="dataartsstudio_01_0425__b38712053111310">1</strong>, <strong id="dataartsstudio_01_0425__b987215533138">2</strong>, and <strong id="dataartsstudio_01_0425__b8872145315134">3</strong> correspond to <strong id="dataartsstudio_01_0425__b10872653191320">begin</strong>, <strong id="dataartsstudio_01_0425__b8872115319132">end</strong>, and <strong id="dataartsstudio_01_0425__b10872155311133">exit</strong>, respectively.</p>
<ul id="dataartsstudio_01_0425__ul1230917286428"><li id="dataartsstudio_01_0425__li9309122819428">When the interaction parameter is set to <strong id="dataartsstudio_01_0425__b1434185414620">1</strong>, the execution result is <strong id="dataartsstudio_01_0425__b07421244718">start something</strong>.</li><li id="dataartsstudio_01_0425__li53091928164216">When the interaction parameter is set to <strong id="dataartsstudio_01_0425__b11500069479">2</strong>, the execution result is <strong id="dataartsstudio_01_0425__b4500662471">stop something</strong>.</li><li id="dataartsstudio_01_0425__li123111428114217">When the interaction parameter is set to <strong id="dataartsstudio_01_0425__b119745166475">3</strong>, the execution result is <strong id="dataartsstudio_01_0425__b99751016194712">exit</strong>.</li></ul>
<pre class="screen" id="dataartsstudio_01_0425__screen731118287425">#!/bin/bash
select Actions in "begin" "end" "exit"
do
case $Actions in
"begin")
echo "start something"
break
;;
"end")
echo "stop something"
break
;;
"exit")
echo "exit"
break
;;
*)
echo "Ignorant"
;;
esac
done</pre>
<p id="dataartsstudio_01_0425__p8327369513">The following is an example of using the read -p syntax:</p>
<pre class="screen" id="dataartsstudio_01_0425__screen954512396512">read -p "Parameter 1 and parameter 2"Variable 1 Variable 2</pre>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="dataartsstudio_01_0425__li6188115519542">Edit shell statements in the editor. To facilitate script development, <span id="dataartsstudio_01_0425__text34311512142">DataArts Factory</span> provides the following capabilities:<ul id="dataartsstudio_01_0425__ul2335154451820"><li id="dataartsstudio_01_0425__li203351144151815">The script editor supports the following shortcut keys, which improve the script development efficiency:<ul id="dataartsstudio_01_0425__en-us_topic_0181092880_ul56601946112219"><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li14373185914265"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1066715327468">F8</strong>: Run a script.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li26191439142715"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b3889183564616">F9</strong>: Stop running a script.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li36602464228"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b13361941164612">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b9808104234618">/</strong>: Comment out or uncomment the line or code block where the cursor resides.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li5660134611221"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1121154714618">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b11411049194618">S</strong>: Save a script.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li866019461229"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b17600352124610">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b99931054104611">Z</strong>: Undo an action.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li1866015462221"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b195202059174618">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b0891533473">F</strong>: Search for information.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li2066024615229"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b187071474475">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1050671014712">Shift</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1682941212473">R</strong>: Replace</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li4660144642210"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1826401710476">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b5163121913476">X</strong>: Cut (Cut a line when the cursor selects nothing.)</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li186601546192215"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b27011526194713">Alt</strong> + mouse dragging: Select columns to edit a block.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li19660146112213"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b2884233154717">Ctrl</strong> + mouse click: Select multiple lines to edit or indent them together.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li766034613223"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b11553184117472">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b15553114174715"></strong> (or <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b125531441154716"></strong>): Move the cursor rightwards (or leftwards) by word.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li18660546182217"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b13154174424719">Ctrl</strong> +<strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b14154644104712"> Home</strong> or <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b10154194424720">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b8154134420475">End</strong>: Navigate to the beginning or end of the current file.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li15660104662212"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b11969745204720">Home</strong> or <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b096934544712">End</strong>: Navigate to the beginning or end of the current line.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li1666014682218"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b644214844712">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1344214481473">Shift</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b3442548124710">L</strong>: Double-click all the same character strings and add cursors to them to implement batch modification.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li1252313711294"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b55181814229">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b181914121320">D</strong>: Delete a line.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li11649122613018"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b86391429227">Shift</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b11142153213213">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b143341734529">U</strong>: Unlock a script.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li219431175418"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b17791124615217">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b167936481127">Alt</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b16417950628">K</strong>: Select the word where the cursor resides.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li5134344165412"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b72811959354">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b011655717519">B</strong>: Format</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li94225277567"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b13210863125">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b14633108151217">Shift</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b17305710201216">Z</strong>: Redo</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li615165415612"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b14925193110127">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b13569193411220">Enter</strong>: Execute the selected line or content.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li143125387582"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b152921257111218">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b14634185981218">Alt</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b669816121312">F</strong>: Flag</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li2713113917215"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b362762812139">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b112501331141319">Shift</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b912411331137">K</strong>: Search for the previous one.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li67146391428"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b863773919481">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b10292104114815">K</strong>: Search for the next one.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li1371419391024"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1137064514486">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b181074815485">Backspace</strong>: Delete the word to the left of the cursor.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li87154392213"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b194591955134815">Ctrl</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b08031011144918">Delete</strong>: Delete the word to the right of the cursor.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li147151039126"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b84691133134914">Alt</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1634736184913">Backspace</strong>: Delete all content from the beginning of the line to the cursor.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li971615395218"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1410471820596">Alt</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b6104111816599">Delete</strong>: Delete all content from the cursor to the end of the line.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li071615397219"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b20647205695917">Alt</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1715611131001">Shift</strong>-<strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b4329220403">Left</strong>: Select all content from the beginning of the line to the cursor.</li><li id="dataartsstudio_01_0425__en-us_topic_0181092880_li871610392213"><strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b68263111623">Alt</strong> + <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b98263111024">Shift</strong>-<strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b148262011727">Right</strong>: Select all content from the cursor to the end of the line.</li></ul>
</li><li id="dataartsstudio_01_0425__li5335204418188">Script parameter function. Use this function in either of the following ways:<ol type="a" id="dataartsstudio_01_0425__ol1436819354313"><li id="dataartsstudio_01_0425__li1636812351239">Write the script parameter name and parameter value in the shell statement. When the shell script is referenced by a job, if the parameter name configured for the job is the same as the parameter name of the shell script, the parameter value of the shell script is replaced by the parameter value of the job.<p id="dataartsstudio_01_0425__p84958291331"><a name="dataartsstudio_01_0425__li1636812351239"></a><a name="li1636812351239"></a>An example is as follows:</p>
<pre class="screen" id="dataartsstudio_01_0425__screen13495529434">a=1
echo ${a}</pre>
<p id="dataartsstudio_01_0425__p19495122915314">In the preceding command, <em id="dataartsstudio_01_0425__i44121127161513">a</em> indicates the parameter name. It can contain only letters, digits, hyphens (-), underscores (_), greater-than signs (&gt;), and less-than signs (&lt;), and can contain a maximum of 16 characters. The parameter name must be unique.</p>
</li><li id="dataartsstudio_01_0425__li69521141138">Configure parameters in the upper part of the editor. When you execute the shell script, the configured parameters are transferred to the script. Separate parameters by spaces, for example, <strong id="dataartsstudio_01_0425__b4336104182010">a b c</strong>. The parameter must be referenced by the shell script. Otherwise, the parameter is invalid.<p id="dataartsstudio_01_0425__p209381991745">Note: If a variable is referenced in the shell script, use the <em id="dataartsstudio_01_0425__i181631966">$args</em> format instead of the <em id="dataartsstudio_01_0425__i195360736">${args}</em> format. Otherwise, the variable will be replaced by a parameter with the same name in the job.</p>
</li></ol>
</li><li id="dataartsstudio_01_0425__li2959161414587">Owner<p id="dataartsstudio_01_0425__en-us_topic_0181092880_p35201452165315"><a name="dataartsstudio_01_0425__li2959161414587"></a><a name="li2959161414587"></a>Click <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b3390106142918">Basic Info</strong> to set the script owner and description.</p>
</li><li id="dataartsstudio_01_0425__li1170625913184">The script cannot be larger than 16 MB.</li><li id="dataartsstudio_01_0425__li17280185702320">Allows you to go to the release page from the script development page in enterprise mode. Place the cursor over <span><img id="dataartsstudio_01_0425__en-us_topic_0181092880_image260053511820" src="en-us_image_0000002269116013.png"></span> and click <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b5293135061614">Release</strong>.</li></ul>
</li><li id="dataartsstudio_01_0425__li2188855175411">In the lower part of the editor, click <span class="uicontrol" id="dataartsstudio_01_0425__en-us_topic_0114018164_uicontrol58024265817"><b>Execute</b></span>. After executing the shell statement, view the execution history and result of the script in the lower part of the editor.<div class="note" id="dataartsstudio_01_0425__note263852419151"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><div class="p" id="dataartsstudio_01_0425__p33311659121516">You can perform the following operations on execution results:<ul id="dataartsstudio_01_0425__ul14207151182813"><li id="dataartsstudio_01_0425__li3574182288">Double-click or right-click the name of an execution result tab to rename it. The name can contain a maximum of 16 characters.</li><li id="dataartsstudio_01_0425__li24232102817">Right-click the name of an execution result tab to close the current tab, all the tabs to the left or right of the current tab, all the other tabs, or all the tabs.</li><li id="dataartsstudio_01_0425__li19355422113913">The execution result of a Shell script cannot be larger than 30 MB. Otherwise, an error is reported.</li><li id="dataartsstudio_01_0425__li17619233372">When viewing the script execution result, you can double-click a field in any row to view the result details. You can copy the field name.</li><li id="dataartsstudio_01_0425__li1836684741610">You can control display of the script execution history by setting <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1785141313301">Script Execution History</strong> in <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b2962161610303">Default Configuration</strong> to <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1943110206309">Myself</strong> or <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b161991225123012">All users</strong>.</li></ul>
</div>
</div></div>
</li><li id="dataartsstudio_01_0425__li1188455205416">Above the editor, click <strong id="dataartsstudio_01_0425__b49501350133010">Save</strong> to save the script.<div class="p" id="dataartsstudio_01_0425__en-us_topic_0104967365_p9461125175714">If the script is created but not saved, set the parameters listed in <a href="#dataartsstudio_01_0425__en-us_topic_0104967365_table35383235269">Table 3</a>.
<div class="tablenoborder"><a name="dataartsstudio_01_0425__en-us_topic_0104967365_table35383235269"></a><a name="en-us_topic_0104967365_table35383235269"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0425__en-us_topic_0104967365_table35383235269" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Script parameters</caption><thead align="left"><tr id="dataartsstudio_01_0425__en-us_topic_0104967365_row55381123202616"><th align="left" class="cellrowborder" valign="top" width="31.39%" id="mcps1.3.3.2.8.2.2.2.4.1.1"><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p1153817231264">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.469999999999999%" id="mcps1.3.3.2.8.2.2.2.4.1.2"><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p195381623142618">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.14%" id="mcps1.3.3.2.8.2.2.2.4.1.3"><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p75541123192614">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0425__en-us_topic_0104967365_row5554122311266"><td class="cellrowborder" valign="top" width="31.39%" headers="mcps1.3.3.2.8.2.2.2.4.1.1 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p155414231262">Script Name</p>
</td>
<td class="cellrowborder" valign="top" width="14.469999999999999%" headers="mcps1.3.3.2.8.2.2.2.4.1.2 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p7554122342613">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="54.14%" headers="mcps1.3.3.2.8.2.2.2.4.1.3 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p255482312611">Name of the script. The name contains a maximum of 128 characters, including only letters, numbers, hyphens (-), underscores (_), and periods (.).</p>
</td>
</tr>
<tr id="dataartsstudio_01_0425__en-us_topic_0104967365_row155541323182616"><td class="cellrowborder" valign="top" width="31.39%" headers="mcps1.3.3.2.8.2.2.2.4.1.1 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p655422312266">Description</p>
</td>
<td class="cellrowborder" valign="top" width="14.469999999999999%" headers="mcps1.3.3.2.8.2.2.2.4.1.2 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p4554122316263">No</p>
</td>
<td class="cellrowborder" valign="top" width="54.14%" headers="mcps1.3.3.2.8.2.2.2.4.1.3 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p13554112392618">Description of the script</p>
</td>
</tr>
<tr id="dataartsstudio_01_0425__en-us_topic_0104967365_row25851239261"><td class="cellrowborder" valign="top" width="31.39%" headers="mcps1.3.3.2.8.2.2.2.4.1.1 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p18585623182610">Select Directory</p>
</td>
<td class="cellrowborder" valign="top" width="14.469999999999999%" headers="mcps1.3.3.2.8.2.2.2.4.1.2 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p16585112317266">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="54.14%" headers="mcps1.3.3.2.8.2.2.2.4.1.3 "><p id="dataartsstudio_01_0425__en-us_topic_0104967365_p9585102317266">Directory to which the script belongs. The root directory is selected by default.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="dataartsstudio_01_0425__en-us_topic_0104967365_note1913422012563"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dataartsstudio_01_0425__en-us_topic_0181092880_p5134172010566">If you open an unsaved script, you can restore its content from the local cache.</p>
<p id="dataartsstudio_01_0425__en-us_topic_0181092880_p1846155151511">After the script is saved, a version is automatically generated and displayed in <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b1190615336913">Versions</strong>. The version can be rolled back. If you save a script multiple times within a minute, only one version is recorded. If the intermediate data is important, you can click <strong id="dataartsstudio_01_0425__en-us_topic_0181092880_b20447153817916">Save new version</strong> to save and add a version.</p>
</div></div>
</div>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_01_0406.html">Developing Scripts</a></div>
</div>
</div>