Reputation:
I'm new to clear case. I need to write a script to find out the files checked out in a view. It should be listing with fileName with directory and who checkout it.
I created findCheckout.sh
cd /vobs/vobElemnt
ct lsco -rec -cview
I executed
ct setview viewName
./findCheckout.sh
It displayed
21-Jul.13:39 idOfWhoCheckedOut checkout version "./src/java/com/package/MyJavaClass.java" from /main/vob_view/view_integ/view_common_source/vobName_source_build/viewName/0 (reserved)
I only want to echo the ./src/java/com/package/MyJavaClass.java
and idOfWhoCheckedOut
.
How can I get that?
Upvotes: 1
Views: 641
Reputation: 1323553
Looking at lsco
man page, you should combine your cleartool lsco command with fmt_ccase
directive.
ct lsco -rec -cview -fmt "\tElement: %-13.13En Version: %Vn User: %u\n"
That would display only what you want (you can remove the Version part if you don't need it)
That way, the parsing to do is much simpler than trying to awk/cut/sed your way in the full original output of a lsco
.
Build the output you want with the fmt_ccase directives.
Upvotes: 0