Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to know the best program (Surely a text editor) to make string manipulation like string substituion.

By the way, I would like to do the next: String manipulation of type String substitution in mathematical expression

Thank you so much!

share|improve this question

closed as not constructive by slhck, Simon Sheehan, Nifle, Daniel Beck, Oliver Salzburg Mar 11 '12 at 15:31

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

On what platform? –  GreenMatt Nov 23 '10 at 14:58
To do the type of manipulation you asked about in your previous question, Perl or Python are your best bets (my answer there uses Perl). AWK might be able to do it. It would take a really complex sed script to even come close. It may be that the regex processing in vim or emacs is up to the challenge. @GreenMatt: The One True Platform - Windows. ;-) –  Dennis Williamson Nov 23 '10 at 19:53

2 Answers 2

up vote 3 down vote accepted

My preferences are in this order: perl, vim (vi, gvim, etc.) substitution commands, sed, and awk.

perl is a heavy software program that can do math as well. See http://perlmonks.org/ for more details.

Vi is the well known text editor all *ix systems have (Linux, Unix, etc.), which, incidentally, can do some nice scripting.

Sed is, well see http://linux.die.net/man/1/sed

Awk (gawk and its brethren) is, well see http://linux.die.net/man/1/awk

... almost forgot. The absolute best, and with a price tag to match, is PowerGrep. Without a doubt, the easiest way to formulate complex queries and replacements of text in DOC, TXT, and other files.

share|improve this answer
superuser.com/questions/39384/best-grep-like-tool if you are interested in regular expressions and Grep –  Rolnik Nov 23 '10 at 15:10

Take a look at sed

share|improve this answer

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