Re: bash usage.
On 26 October 2017 at 11:39, <peter@xxxxxxxxxxx> wrote:
> According to 'man mountpoint', it returns 0 if something is mounted.
> So why the complaint from
> if [ mountpoint $WorkingDirectory ] ?
On 26 October 2017 at 12:23, Roberto C. Sánchez <roberto@xxxxxxxxxx> wrote:
> mountpoint -q $WorkingDirectory
> if [[ $? = 0 ]]
That will work, but is ridiculous considering this works by design:
if mountpoint -q "$wd" ; then
echo "$wd is a mountpoint"