Reputation: 32316
How do I remove the greater than < sign from the beginning of the line ^
file.txt
> INSERT INTO
> INSERT INTO
Expected:
INSERT INTO
INSERT INTO
Upvotes: 1
Views: 2087
Reputation: 342363
awk
awk '{gsub(/^[ \t]*>[ \t]*/,"")}1' file
awk '{$1=""}1' file
sed
sed 's/^[ \t]*>[ \t]*//' file
cut
cut -d" " -f2- file
or using the shell
while read -r line; do echo ${line##>}; done < file
Upvotes: 0