hey,
i m having a hard time trying to print only the first occurrence between 2 idenicale strings.
for the following output:
please
help
me im a
noob
please
im a noob
help me
noob
please
help
me im a
noob
please
im a noob
help me
noob
i m trying to get only the first occurrence between "noob" and "noob" like so:
noob
please
im a noob
thats what i got so far:
sed -e '1,/noob/d' -e '/noob/,$d' file.txt
but it returns only:
please
im a
but i want it to also print the "noob" string.
any help will be great
Thanks!!!