<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.foxdiv20180412160736284178 { }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>hi chris:</div><div><br></div><div>i know where i am wrong ,<span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"> </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">"#! joel" there is a space in the "!" and the "joel",but at first i do not add the space. </span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">and the file can not have suffix as ".txt", if the file has the suffix, the chmod command can not work . i do not know why.</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">now i can execute the script successfully ,thank you very much , but i can  not see the echo in my shell output.</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">how can i see my command output just like i put one command in the shell ?</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">best </span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">ben</span></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>bin.wang@qkmtech.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:bin.wang@qkmtech.com">bin.wang@qkmtech.com</a></div><div><b>Date:</b> 2018-04-12 15:58</div><div><b>To:</b> <a href="mailto:chrisj@rtems.org">Chris Johns</a>; <a href="mailto:users@rtems.org">Users</a></div><div><b>Subject:</b> Re: Re: rtems shell script</div></div></div><div><div class="FoxDiv20180412160736284178">
<div><span></span><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">On 12/04/2018 17:40, </span><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">Chris Johns<chrisj@rtems.org> wrote<br></span></div><div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);"><br></span></div><div>>It can. You need to add "#! joel" as the first line and you need to set an</div><div>>appropriate the execute bit, that is user, group or other.</div><div><br></div><div><br></div><div>thank you very much </div><div><br></div><div>as you said i add "<span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">#! joel"as the first line ,and </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"> i change  the mode to 777, but i still can not run the script,</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;"><br></span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">result as follows:</span></div><div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">----------------------------------</span></div><span style="color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">[/scripts] # ./prfjog_1.txt<br>Unable to execute /scripts/prfjog_1.txt<br>[/scripts] # chmod 777 prfjog_1.txt<br>[/scripts] # ./prfjog_1.txt<br>Unable to execute /scripts/prfjog_1.txt<br></span></div>
<div>----------------------------------</div><div><br></div><div>best </div><div>ben</div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>bin.wang@qkmtech.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:chrisj@rtems.org">Chris Johns</a></div><div><b>Date:</b> 2018-04-12 15:40</div><div><b>To:</b> <a href="mailto:bin.wang@qkmtech.com">bin.wang@qkmtech.com</a>; <a href="mailto:users@rtems.org">Users</a></div><div><b>Subject:</b> Re: rtems shell script</div></div></div><div><div>On 12/04/2018 17:29, bin.wang@qkmtech.com wrote:</div>
<div>> hi everyone:</div>
<div>> this is my shell cmdline</div>
<div>> -----------------------------------------------------</div>
<div>> [/] # cd scripts</div>
<div>> [/scripts] # ls</div>
<div>> prfjog.txt</div>
<div>> [/scripts] # prfjog.txt</div>
<div>> Unable to execute /scripts/prfjog.txt</div>
<div>> [/scripts] # ./prfjog.txt</div>
<div>> Unable to execute /scripts/prfjog.txt</div>
<div>> ---------------------------------------------------------------</div>
<div>> i do not know whether rtems shell can execute a script?</div>
<div> </div>
<div>It can. You need to add "#! joel" as the first line and you need to set an</div>
<div>appropriate the execute bit, that is user, group or other.</div>
<div> </div>
<div>Chris</div>
</div></blockquote>
</div></div></blockquote>
</body></html>