Hacker News new | past | comments | ask | show | jobs | submit login

No mention of ';' to have multiple command on one line.

Example:

    sed '10{p;q;}' myfile.txt



Thank you for your feedback! Personally I very rarely use the ; operator since it works badly with braces and commands that use files. However I've added an example using the ; operator.

PS: May I humbly point out that the command you provided will actually print up to line 10 and then a duplicate line. Like I said, unexpected (even though it seems logical). :)


Yes: forgot -n




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: