0

Say I have the following

$f1=/some/path
$f2=/some/subpath
$f3=/some/other/subpath

If I try:

test1=${$f1/$f2/${f3:t}}

zsh complains with bad substitution.

However:

test2=${f3:t}

works well. What am I doing wrong?

2

The problem is with the extra $ in front of f1. Try:

test1=${f1/$f2/${f3:t}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.