From: Yash on
I have a requirement to run a script code in linuxrc which deals with
string and sub string functionality. But the linuxrc file contains #!/
bin/nash so its not recognizing any bash shell commands. How I can use
Bash shell commands in linuxrc can I change the first line #!/bin/
nash to #!/bin/bash and the system will execute in bash shell. What
if bash shell is not present at that point. and in this case if it
executes will it execute all the nash commands properly in bash shell.

Thanks in adv
yash

From: Yash on
On Apr 28, 10:37 am, Yash <yash18...(a)gmail.com> wrote:
> I have a requirement to run a script code inlinuxrcwhich deals with
> string and sub string functionality. But thelinuxrcfile contains #!/
> bin/nash so its not recognizing anybashshell commands. How I can useBashshell commands inlinuxrccan I change the first line  #!/bin/
> nash to  #!/bin/bashand the system will execute inbashshell. What
> ifbashshell is not present at that point. and in this case if it
> executes will it execute all the nash commands properly inbashshell.
>
> Thanks in adv
> yash

I can't seem to use any other command interpreter (e.g. sh) in the /
linuxrc file, if I change the linuxrc from #!/bin/
nash to #!/bin/bash the kernel just gives me an error, asking me to
specify init="", however the relevant command is there!
Even the ls cat all basic commands are not working.

Is it only possible to use "bash" in the linuxrc script and if so how?

Thanks for your help
From: Icarus Sparry on
On Wed, 28 Apr 2010 11:05:38 -0700, Yash wrote:

> On Apr 28, 10:37 am, Yash <yash18...(a)gmail.com> wrote:
>> I have a requirement to run a script code inlinuxrcwhich deals with
>> string and sub string functionality. But thelinuxrcfile contains #!/
>> bin/nash so its not recognizing anybashshell commands. How I can
>> useBashshell commands inlinuxrccan I change the first line  #!/bin/
>> nash to  #!/bin/bashand the system will execute inbashshell. What
>> ifbashshell is not present at that point. and in this case if it
>> executes will it execute all the nash commands properly inbashshell.
>>
>> Thanks in adv
>> yash
>
> I can't seem to use any other command interpreter (e.g. sh) in the /
> linuxrc file, if I change the linuxrc from #!/bin/ nash to #!/bin/bash
> the kernel just gives me an error, asking me to specify init="", however
> the relevant command is there! Even the ls cat all basic commands are
> not working.
>
> Is it only possible to use "bash" in the linuxrc script and if so how?
>
> Thanks for your help

It is certainly possible to use bash or anything else as a command
interpreter *provided that it is available*.

Since you are talking about linuxrc, I am guessing that you are talking
about an initial ramdisk. How are you creating this ramdisk? When you
create it are you adding a copy of bash to it?