将输出保存到变量中

tev*_*n84 4 macos bash shell command-line

我试过了30分钟.这段代码有什么问题?:(输入:

var = `cat marktplatz.html | grep -m 1 "post" | grep -o -E '\b(jobs/.*htm)' `
Run Code Online (Sandbox Code Playgroud)

输出:

var: command not found
Run Code Online (Sandbox Code Playgroud)

Fre*_*Foo 5

var = BLABLA
Run Code Online (Sandbox Code Playgroud)

应该

var=BLABLA
Run Code Online (Sandbox Code Playgroud)

第一种形式被解释为运行var带有=第一个参数的命令.