Do start up programs run inside or outside the shell?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Do start up programs run inside or outside the shell?

ToddAndMargo-2
Hi All,

Do (session and) start up programs run inside or
outside the "Shell" (bash)?

I other words, if I want something to run inside the shell, do I
need `bash -c "xxx"`

Many thanks,
-T

_______________________________________________
Xfce mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce
http://www.xfce.org
Reply | Threaded
Open this post in threaded view
|

Re: Do start up programs run inside or outside the shell?

ToddAndMargo-2
On 4/23/19 3:48 PM, ToddAndMargo wrote:

> Hi All,
>
> Do (session and) start up programs run inside or
> outside the "Shell" (bash)?
>
> I other words, if I want something to run inside the shell, do I
> need `bash -c "xxx"`
>
> Many thanks,
> -T


Figured it out.  It is outside the shell, so I
needed to add

    bash -d "xxx"

    bash -c "if [ ! $(pgrep osmo) ]; then /usr/bin/osmo; fi"


_______________________________________________
Xfce mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce
http://www.xfce.org
Reply | Threaded
Open this post in threaded view
|

Re: Do start up programs run inside or outside the shell?

Sylvain Viart
Hi,

On 24/04/2019 21:54, ToddAndMargo wrote:
On 4/23/19 3:48 PM, ToddAndMargo wrote:
Do (session and) start up programs run inside or
outside the "Shell" (bash)?

I other words, if I want something to run inside the shell, do I
need `bash -c "xxx"`

Figured it out.  It is outside the shell, so I
needed to add

   bash -d "xxx"

   bash -c "if [ ! $(pgrep osmo) ]; then /usr/bin/osmo; fi"

My advise is:

put all your commands into a shell script and call it. You will have many benefits:

  • git control source available
  • editor and clear syntax reading
  • you know the running environment
  • you can document inside your code, for later when you come back
  • many more...

Regards,

Sylvain.



-- 
Sylvain Viart - GNU/Linux Sysadmin/Developper/DevOps - France

_______________________________________________
Xfce mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce
http://www.xfce.org
Reply | Threaded
Open this post in threaded view
|

Re: Do start up programs run inside or outside the shell?

ToddAndMargo-2


On 4/24/19 11:14 PM, Sylvain Viart wrote:

> Hi,
>
> On 24/04/2019 21:54, ToddAndMargo wrote:
>> On 4/23/19 3:48 PM, ToddAndMargo wrote:
>>> Do (session and) start up programs run inside or
>>> outside the "Shell" (bash)?
>>>
>>> I other words, if I want something to run inside the shell, do I
>>> need `bash -c "xxx"`
>>
>> Figured it out.  It is outside the shell, so I
>> needed to add
>>
>>    bash -d "xxx"
>>
>>    bash -c "if [ ! $(pgrep osmo) ]; then /usr/bin/osmo; fi"
>
> My advise is:
>
> put all your commands into a shell script and call it. You will have
> many benefits:
>
>   * git control source available
>   * editor and clear syntax reading
>   * you know the running environment
>   * you can document inside your code, for later when you come back
>   * many more...
>
> Regards,
>
> Sylvain.

Makes perfect sense.  Thank you!  And I write a lot
in Perl 6 too, which the taype of things are really easy
to do.  Plus Perl6 gives you the system calls option of
running inside the shell or outside


_______________________________________________
Xfce mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce
http://www.xfce.org