rtems shell script

bin.wang at qkmtech.com bin.wang at qkmtech.com
Thu Apr 12 08:12:37 UTC 2018


hi chris:

i know where i am wrong , "#! joel" there is a space in the "!" and the "joel",but at first i do not add the space. 
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.

now i can execute the script successfully ,thank you very much , but i can  not see the echo in my shell output.
how can i see my command output just like i put one command in the shell ?

best 
ben



bin.wang at qkmtech.com
 
From: bin.wang at qkmtech.com
Date: 2018-04-12 15:58
To: Chris Johns; Users
Subject: Re: Re: rtems shell script
On 12/04/2018 17:40, Chris Johns<chrisj at rtems.org> wrote

>It can. You need to add "#! joel" as the first line and you need to set an
>appropriate the execute bit, that is user, group or other.


thank you very much 

as you said i add "#! joel"as the first line ,and  i change  the mode to 777, but i still can not run the script,

result as follows:
----------------------------------
[/scripts] # ./prfjog_1.txt
Unable to execute /scripts/prfjog_1.txt
[/scripts] # chmod 777 prfjog_1.txt
[/scripts] # ./prfjog_1.txt
Unable to execute /scripts/prfjog_1.txt
----------------------------------

best 
ben


bin.wang at qkmtech.com
 
From: Chris Johns
Date: 2018-04-12 15:40
To: bin.wang at qkmtech.com; Users
Subject: Re: rtems shell script
On 12/04/2018 17:29, bin.wang at qkmtech.com wrote:
> hi everyone:
> this is my shell cmdline
> -----------------------------------------------------
> [/] # cd scripts
> [/scripts] # ls
> prfjog.txt
> [/scripts] # prfjog.txt
> Unable to execute /scripts/prfjog.txt
> [/scripts] # ./prfjog.txt
> Unable to execute /scripts/prfjog.txt
> ---------------------------------------------------------------
> i do not know whether rtems shell can execute a script?
 
It can. You need to add "#! joel" as the first line and you need to set an
appropriate the execute bit, that is user, group or other.
 
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20180412/0f931e82/attachment-0002.html>


More information about the users mailing list