如何删除大于<从行的开头标记^
file.txt
> INSERT INTO
> INSERT INTO
Expected:
INSERT INTO
INSERT INTO
答案 0 :(得分:1)
尝试一下:
sed 's/^> //' inputfile
答案 1 :(得分:0)
AWK
awk '{gsub(/^[ \t]*>[ \t]*/,"")}1' file
awk '{$1=""}1' file
SED
sed 's/^[ \t]*>[ \t]*//' file
切
cut -d" " -f2- file
或使用shell
while read -r line; do echo ${line##>}; done < file
答案 2 :(得分:0)
awk -F'>' '{print $2}' file.txt