note I'm a beginner with SED.
We make use of sed-command which looks in the output of a clearcase command and obtains the names of users with a view:
<clearcase output> | sed -n "/Development streams:/,// s/[^ ]* *Views: *\([^_ ]*\)_.*/\1/p"
(Example clearcase output:
Project: project:xx0.0_xx0000@/xxxx/xxxxx_xxxxxxxx0
Project's mastership: XXXXXXXXX@/xxxx/xxxxx_xxxxxxxx0
Project folder: folder:XX0.0@/xxxx/xxxxx_xxxxxxxx0 (RootFolder/Xxxxxxxx/XX0.0)
Modifiable components:component:00000000000@/xxxx/xxxxxx_xxxxxxxx0
component:xxxxxxx_xxxxxxx@/xxxx/xxxxxx_xxxxxxxx0
component:xxxxxxxxxxxxxx_x@/xxxx/xxxxxx_xxxxxxxx0
component:xxxxx@/xxxx/xxxxxx_xxxxxxxx0
component:xxxxxx_xxxxxxxxxxx@/xxxx/xxxxxx_xxxxxxxx0
Integration stream: stream:xx0.0_xx0000_integration@/xxxx/xxxxx_xxxxxxxx0 (FI: nemelis)
Integration views: olduser_xx0.0_xx0000_int - Properties: dynamic ucmview readwrite nshareable_dos
nemelis_xx0.0_xx0000_int - Properties: dynamic ucmview readwrite nshareable_dos
otheruser_xx0.0_xx0000_int - Properties: dynamic ucmview readwrite nshareable_dos
Development streams: stream:nemelis_xx0.0_xx0000@/xxxx/xxxxx_xxxxxxxx0 [unlocked] - No rebase or delivery is pending.
Views:nemelis_xx0.0_xx0000
stream:otheruser_xx0.0_xx0000_streamidentifier@/xxxx/xxxxx_xxxxxxxx0 [unlocked] - No rebase or delivery is pending.
Views:otheruser_xx0.0_xx0000_streamidentifier
)
On Solaris it will output:
nemelis
otheruser
But on (Redhat-)Linux only the first name is given.
(Note: I've looked on Stackoverflow and found comments that Sed is always greedy on Posix / Gnu and that Perl should be used (see Non greedy regex matching in sed?). Thus I've tried to fix it with Perl, but than I ran into a forrest of problems with the p at the end, using "//", "|", missing operator before < token >, etcetera, hence my post here)