Hey I'm currently trying to split a string and echo each portion of it to a new line.
Normally the usage of /n will force the next text onto a new line but doesnt seem to work. Is there any work around for this
I want the code below to echo this:
[Ant|Spider|Bullfrog]
to this:
Ant
Spider
Bullfrog
This code was basically trying to replace | with the required syntax to do so
if ($regsub(%section,/\|/g,$chr(32) $chr(124) $chr(32) $chr(47)n $chr(32),%section) > 0) {
echo -a %section
}
Note Im using this in an alias.