Article 575BT [SOLVED] Bad substitution

[SOLVED] Bad substitution

by
GPGAgent
from LinuxQuestions.org on (#575BT)
I can't get my head around this one:Code:jonke@charlie:~$ d=$(pwd)
jonke@charlie:~$ echo $d
/home/jonke
jonke@charlie:~$ d=${d##*/}
jonke@charlie:~$ echo $d
jonke
jonke@charlie:~$ echo ${$(pwd)##*/}
bash: ${$(pwd)##*/}: bad substitution
jonke@charlie:~$I want to avoid using the variable d, and just use the syntax directly in my script.

Basically it just gets the directory name.latest?d=yIl2AUoC8zA latest?i=3uAEsIgyGDE:p3BUncv2zzs:F7zBnMy latest?i=3uAEsIgyGDE:p3BUncv2zzs:V_sGLiP latest?d=qj6IDK7rITs latest?i=3uAEsIgyGDE:p3BUncv2zzs:gIN9vFw3uAEsIgyGDE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments