System: Solaris I'm trying to split a string into another string
For example:
The main string is: I Part of the "root" substrings I want to divide into two such as and This is the code that I have implemented using FS, but this is Gum does not: Works here, aside from additional / as / asdasd / asdasd / root / asdqwe / asd / asssdd / $ 1 = / as / asdasd / asdasd / $ 2 = asdqwe / asd / asssdd /
echo / as / asdasd / asdasd / root / asdqwe / asd / asssdd / | Awk 'BEGIN {FS = "root"} {print $ 2}' ' / which you do not handle, maybe you want "root /" as your delimiter? It may also be necessary to use a new awk ; Solaris is still the old V7 Unix awk as / usr / bin / awk , posix-compatible awk / usr / bin / Nose .
Comments
Post a Comment