hlovdal answer , , , ( ClearCase ).
:
cleartool find . -type f -element 'lbtype_sub(LBL_A)' -print
( , ). -version , .
fmt_ccase , , perl script :
cleartool find . -type f -element 'lbtype_sub(LBL_A)' -exec 'cleartool describe -fmt "%En %Cl\n" \"$CLEARCASE_XPN\"' | grep -v ","
-fmt "%En %l\n" ( :/a/b/myFile @@/main/myVersion) => /a/b/myFile'. the '\n` .-version -fmt "%n %l\n"\"$CLEARCASE_XPN\": , , .grep -v ",": - , " "%Cl: . , , !
So, to find the exact version :
cleartool find . -type f -version 'lbtype_sub(LBL_A)' -exec 'cleartool describe -fmt "%n %Cl\n" \"$CLEARCASE_XPN\"' | grep -v ","|awk '{sub(/ \(.*/,"");print}'
Note:
The above works with unix syntax. Window Syntax:
cleartool find . -type f -element "lbtype(LBL_A)" -exec "cleartool describe -fmt \"%n %Cl\n\" \"%CLEARCASE_XPN%\"" | grep -v "," | gawk "{gsub(/ \(.*,"");print}"
in which the version of files with only one (correct) label will be displayed.
awk '{sub(/ \(.*/,"");print}'converts " myFile@@/main/myVersion (LBL_A)" to "myFile @@ / main / myVersion"
source
share