shell - Basic bash script variable declaration - command not found - Stack Overflow

shell - Basic bash script variable declaration - command not found - Stack Overflow

瀏覽:714
日期:2025-09-29
This seems like such a simple question I'm embarrassed to ask it: test.sh #!/bin/bash STR = "Hello World" echo $STR when I run sh test.sh I get this: test.sh: line 2: STR: command not found ... ... You cannot have spaces around your '=' sign. When you wri...看更多