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!
rahmu 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}'`
Unknown said…
You are the boss!!!
Unknown 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

Outlook : "operation failed, object could not be found. " when trying to close a PST.

Troubleshooting Outlook Express (IMAP, POP3, HTTP, NEWS) with the log file

MSSQL GROUP_CONCAT