[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Is there a way to combine multiple string operations in
From: |
Pierre Gaston |
Subject: |
Re: [Help-bash] Is there a way to combine multiple string operations in the same command? |
Date: |
Mon, 21 Jan 2019 11:20:10 +0100 |
On Mon, Jan 21, 2019 at 5:12 AM Peng Yu <address@hidden> wrote:
> Hi,
>
> For example, I want to trim off /* from $x but only print from the 2nd
> character of $x. The following does not work.
>
> echo ${{x:1}%/*}
>
> But I don't want to introduce temp var or change the content of x.
>
> Is there a way to combine such multiple string operations in the same
> command?
>
> --
> Regards,
> Peng
>
There is not.