by
0
7
3,617
1
Top 1% !
Popular
Famous
Tagged
Easy-to-find
Specified
OpenSource
Popularity: 3422nd place
LanguageBASH
LicenseMIT_X11
OSLinux

Bash one-liner to remove clearcase views in parallel

This bash one liner script allows to remove all the Clearcase views that match some criteria in parallel.

In this case views are listed by 'lsview -s' cleartool command, filtering with grep on specific <WORD>.

Note the '-s' option to get view name in short format.

Once each view is returned, xargs command executes the cleartool 'rmview' command, to delete the item. 

The '&' into the shell command allows parallel execution for each match.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/32399/Bash-one-liner-to-remove-clearcase-views?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
cleartool lsview -s | grep <WORD> | xargs -I '{}' sh -c 'cleartool rmview -tag {} &'
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus