我必须编写一个小的bash脚本来确定一个字符串对于bash变量命名规则是否有效。我的脚本接受变量名作为参数。我尝试使用regex将该参数传递给grep命令,但无论我尝试什么,grep都会尝试打开作为文件传递的值。also tried passing it as redirected input, both with and without quotes
grep "$regex" <"$1"
我有一个python函数,它接受一个参数作为输入,我想通过bash自动化并调用它。但是bash在调用变量时传递变量(字符串)时出现错误。pipeline_runs.z_full_pipeline import test; test($a)"NameError: name 'test' is not defined
但是,当变量为我应该更改什么以将字符串从bash</em