Clearcase check in/uncheck out all the checked out files script

I am so used to source safe recursive check in and found troublesome in clearcase having to do it manually one by one.

This is the Unix script that I have come out with

//for undo check out all the checked out files
cleartool lsco -cview -avobs | cleartool unco -rm `awk '{ print $(5) }' | sed -e 's/^\"*//' -e 's/ *\"$//'`
//for check in all the checked out files
cleartool lsco -cview -avobs | cleartool ci -nc `awk '{ print $(5) }' | sed -e 's/^\"*//' -e 's/ *\"$//'`


//Using xargs

cleartool lsco -cview -avobs -short | xargs cleartool ci

Comments

Jason Test said…
You're the bomb. Thanks a lot for the snippet!
Joe H. Rahme said…
Thak you so much for that tip!
E Hilter said…
ct ci `ct lsco -me -cview -short`
blue_whale said…
You can use this instead:
cleartool lsco -r -cview -short | cleartool ci -nc `awk '{print $1}'`
Sachin Vadvadgi said…
I was not able to execute the command successfully, Please provide me any alternative way to check-in the files automatically.

Popular posts from this blog

MSSQL GROUP_CONCAT

Duplicating a local copy of project from TFS and making web software client factory to work