${$(git rev-parse HEAD):0:5}
bash: ${$(git rev-parse HEAD):0:5}: bad substitution
git rev-parse HEAD
returns the hash id, but how do I make a substring out of it?
if I divide it into two lines, it works.
x=$(git rev-parse HEAD)
echo ${x:0:5}
But How do I do it in one line?