Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split a column

Status
Not open for further replies.

ffaabbrriiccee

Programmer
Mar 29, 2017
1
US
if i have +2, i want this to be + 2 as separate columns. Doing this for a large column so I cannot do it manually.
 
You can use regular expression substitution with back reference.
For example with sed it could be something like this
Code:
$ echo "+2 +3    +123" | sed -E "s/\+([0-9]+)/+ \1/g"
+ 2 + 3    + 123
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top