Đạt Michio
New member
How do you search for a specific line in a file in Unix?
Answer
With sed -e ‘1,N d; M q’ you’ll print lines N+1 through M.
…
Answer
With sed -e ‘1,N d; M q’ you’ll print lines N+1 through M.
…
- + or -c followed by the command – execute the (vi/vim) command after file has been read,
- -s – silent mode, also uses current terminal as a default output,
- q followed by -c is the command to quit editor (add ! to do force quit, e.g. -scq! ).