help-bash
[Top][All Lists]
Advanced

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

[Help-bash] Is there a way to combine multiple string operations in the


From: Peng Yu
Subject: [Help-bash] Is there a way to combine multiple string operations in the same command?
Date: Sun, 20 Jan 2019 22:10:58 -0600

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]