我有以下行要在脚本中执行,并删除它上面的两行。但是现在我的 $TEST 变量包含像“/DATA/test10”这样的值,而我的变量 ID 包含“10”。我如何将它与 sed 一起使用?
sed -i ":a;N;s/\n/&/2;Ta;/path = $TEST\/$ID/s/.*//;P;D" /collection.txt
bash sed environment-variables
bash ×1
environment-variables ×1
sed ×1