Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need a trigger to block mkelem to name elem with space

Posted on 2008-10-14
1
Medium Priority
?
456 Views
Last Modified: 2012-08-13
I am attempting to stop developers from renaming elements with spaces in the filename.  I contacted IBM tech support and they recommend I create a check-in trigger that will fire a Perl script which will check the string pattern for a space (\s or \S) and will either fail and not allow the users to name the element with the space.  I am a novice with ClearCase, and any help or guidance is appreciated in advance.

Please help.
0
Comment
Question by:MADDOGIRISHMAN
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 39

Accepted Solution

by:
Adam314 earned 1500 total points
ID: 22723337
I'm not familiar with ClearCase administration, but from looking around, this should get you close:




***** Create this perl script,
***** save it somewhere all users can access,
***** give it execute permission to all users who will run it
#!/usr/bin/perl
use strict;
 
my $FileName = $ENV{CLEARCASE_PN};
die "You can not use spaces in your file name\n" if $FileName =~ /\s/;
 
 
***** Execute this command at prompt to install the trigger
***** change the /path/to/perl/script.pl to what you saved the above
cleartool mktrtype -c "Trigger to prevent spaces in filenames" -element -all -preop checkin -exec "perl /path/to/perl/script.pl" CHECK_FILENAME_FOR_SPACES

Open in new window

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question