I know the following commands will print upto a certain pattern but will not include the patterned line itself:
sed -n '1,/<pattern>/p' <file>sed '/<pattern>/q' <file>
How to use Sed to print from the start of the file to pattern (included)?
Aucun commentaire:
Enregistrer un commentaire