Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried several commands: tr, sed but to no avail. Here's the file:

> ...
> ...
> setEPS()
> postscript('images/boxplot_default.eps')
> ...
> ...

I want to delete those two undotted lines. Something simple like /> setEps\(\)\n/ would do.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Ok, finally got it: use perl!

perl -i -p -e 's/> setEPS\(\)\n//g' filename

so, the final command:

perl -0777 -i -pe 's/\> setEPS\(\)\n\> postscript\([^\n]*\n\> \n//g' ${output}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.