Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

String manipulation: extracting a part of a string, text replacement, formatting to a given width, etc.

Use this tag for questions about string manipulation, especially in but not limited to shell scripts (use or the specific tag for the shell or other language you're using as appropriate).

For questions about batch processing of text files, see . If the string is a file name or path, use in addition to or instead of . For questions about bypassing the interpretation of special characters, see .

history | excerpt history