Livejournal
Log in
Post
Friends
My journal
mucius_scaevola
Match the first occurrence
Jul 20, 2022 12:40
Выдать
первое соврадение, с помощьё GNU sed.
sed -n '/RE/{p;q;}' file # print only the first match
sed '0,/RE/{//d;}' file # delete only the first match
sed '0,/RE/s//to_that/' file # change only the first match
sed
,
bash
Leave a comment
Previous post
Next post
Up