[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Is there a way to combine $( and ${%}?
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] Is there a way to combine $( and ${%}? |
Date: |
Fri, 8 Dec 2017 08:10:59 -0500 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Dec 07, 2017 at 09:58:34PM -0600, Peng Yu wrote:
> Hi,
>
> I have the following commands. Is there a way to combine them into one
> command?
>
> x=$(readlink -e "$0")
> x=${x%/*}
x=$(readlink -e "$0") x=${x%/*}
There you go. Now it's one command.