问题描述:

This question already has an answer here:

  • Bash script variable declaration - command not found

    3 answers

  • How to set a variable to the output from a command in Bash?

    11 answers

网友答案:

Spaces should be avoided.

out=$(wc -l < songs.txt)
网友答案:

it's easy first of all don't use space after and before equal sign

OUT=$(wc -l < songs.txt)

second for call it you can write something like this :

echo $OUT

Good luck

相关阅读:
Top