你好,我想从字符串中删除一行,但我只是在sed -i 1d file 之类的文件中找到了,但在bash中找不到字符串变量。
sed -i 1d file
尝试v.gr。
string=$(echo "$string" | sed 1d)