[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using `myscript.sh` to change current env



On 9/7/13, der.hans <deb-user@lufthans.com> wrote:
> Am 07. Sep, 2013 schwätzte Zenaan Harkness so:
>
> moin moin Zenaan,
>
> Rather than all the convolutions of command substitution, how about just
> using a function that's in your profile or bashrc?
>
> $ cat /tmp/bashrc
> function changeps() {
>          export PS1=': '
> }
> $ . /tmp/bashrc
> $ changeps
> :
>
> Add arguments to the fx() for your different options :).

Ahh. Even easier, and better (no tmpfile). Wunderbah!

Thank you. Appreciated,
Zenaan


Reply to: