What are some simple options to split a single text line into separate based on a character or pattern? I would like to do this from the command line.
An example would be when you want to inspect the PATH. With a single simple command I'd like to split something like:
/Users/jeff/.rvm/gems/ruby-2.2.1/bin:/Users/jeff/.rvm/gems/ruby-2.2.1@global/bin:/Users/jeff/.rvm/rubies/ruby-2.2.1/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/jeff/bin:/Users/jeff/Utveckling/Alan/alan/bin:/Users/jeff/.gem/ruby/1.8/bin:/Users/jeff/.rvm/bin
into the much more readable
/Users/jeff/.rvm/gems/ruby-2.2.1/bin
/Users/jeff/.rvm/gems/ruby-2.2.1@global/bin
/Users/jeff/.rvm/rubies/ruby-2.2.1/bin
/opt/local/bin
/opt/local/sbin
/opt/local/bin
/opt/local/sbin
/usr/local/mysql/bin
/opt/local/bin
/opt/local/sbin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/opt/X11/bin
/usr/texbin
/Users/jeff/bin
/Users/jeff/Utveckling/Alan/alan/bin
/Users/jeff/.gem/ruby/1.8/bin:/Users/jeff/.rvm/bin