sed '/^>>/d' What does this do exactly?
- User
sed '/^>>/d'
What does this do exactly?
- Assistant
This sed command deletes all the lines from the input file that start with ">>".
- User
What if the line is >>35
- Assistant
The command
/^>>/dwould still delete the line starting with ">>". The "^" symbol in the regular expression means the beginning of the line, so it would match ">>" at the beginning of a line, regardless of what follows it. - User
With sed, how can i delete lines that contain only >> and not >>35?
- Assistant
To delete lines that contain only ">>" and not ">>" followed by any other character such as ">>35", you can use the following sed command:
sed '/^>>$/d'This command deletes all lines that match the pattern "^>>) with ">>", without any characters in between. This will delete lines with only ">>", but will not delete lines that have ">>" followed by any other character.