Topic
  • 14 replies
  • Latest Post - ‏2005-10-25T23:55:55Z by SystemAdmin
SystemAdmin
SystemAdmin
47293 Posts

Pinned topic Unable to use "mkelem" for files with spaces

‏2005-10-25T15:13:23Z |
Hi,
I'm using ClearCase for Windows Version 2003.06.10+ and we recently were told by management that we need to store files with spaces in the filename in ClearCase. We have a Perl script that we use to add new elements to ClearCase and it appears to be failing for filenames with spaces. It's failing on the following command:
cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType $enterDir\\$newelement
(note: the variables $ElemType is "text_file", $enterDir is "M:\nkumar_view\cfs\f60\misc", and $newelement is "this test file.csv" (note the space between "this" and "test", and between "test" and "file").

I get the following cleartool errors when this command gets executed:
"cleartool: Error: Unable to determine view for "test": No such file or directory."
"cleartool: Error" Unable to determine view for "file.csv": No such file or directory."

Is this a ClearCase problem that's not fixable or is there some way for me to get around this problem?

Thanks,
Navin
Updated on 2005-10-25T23:55:55Z at 2005-10-25T23:55:55Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    47293 Posts

    RE:Unable to use "mkelem" for files with spaces

    ‏2005-10-25T15:17:05Z  
    Your script should have

    cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType
    "$enterDir\\$newelement"

    That way the system command sees the quotes

    -----Original Message-----
    From: owner-cciug@lists.us.ibm.com mailto:owner-cciug@lists.us.ibm.com
    On Behalf Of nkumar
    Sent: Tuesday, October 25, 2005 11:13 AM
    To: cciug@lists.us.ibm.com
    Subject: cciug Unable to use "mkelem" for files with spaces

    Hi,
    I'm using ClearCase for Windows Version 2003.06.10+ and we recently were
    told by management that we need to store files with spaces in the
    filename in ClearCase. We have a Perl script that we use to add new
    elements to ClearCase and it appears to be failing for filenames with
    spaces. It's failing on the following command:
    cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType
    $enterDir\\$newelement
    (note: the variables $ElemType is "text_file", $enterDir is
    "M:\nkumar_view\cfs\f60\misc", and $newelement is "this test file.csv"
    (note the space between "this" and "test", and between "test" and
    "file").

    I get the following cleartool errors when this command gets executed:
    "cleartool: Error: Unable to determine view for "test": No such file or
    directory."
    "cleartool: Error" Unable to determine view for "file.csv": No such file
    or directory."

    Is this a ClearCase problem that's not fixable or is there some way for
    me to get around this problem?

    Thanks,
    Navin
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T15:31:59Z  
    Try putting quotes around $newelement. Since this is a Perl script it would look something like: \\\"$newelement\\\"
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re:Unable to use "mkelem" for files with spaces

    ‏2005-10-25T17:10:54Z  
    Navin,

    Try quoting the element name
    i.e. change

    cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType
    $enterDir\\$newelement

    to

    cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType
    "$enterDir\\$newelement"

    Hope this helps

    -Charles

    Try ClearTrigger, ClearReplica and ClearWeb at http://www.abs-consulting.com

    A Better Solution, Inc.

    Charles Clarke III ClearCase Consultant
    A Better Solution, Inc. (770) 252-1500 phone
    50 Springridge Ct.
    Newnan, Ga. 30265 (770) 252-1501 fax
    Email:
    charles@abs-consulting.com
    http://www.abs-consulting.com

    At 11:13 AM 10/25/2005, nkumar wrote:
    >Hi,
    >I'm using ClearCase for Windows Version 2003.06.10+ and we recently were
    >told by management that we need to store files with spaces in the filename
    >in ClearCase. We have a Perl script that we use to add new elements to
    >ClearCase and it appears to be failing for filenames with spaces. It's
    >failing on the following command:
    >cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType
    >$enterDir\\$newelement
    >(note: the variables $ElemType is "text_file", $enterDir is
    >"M:\nkumar_view\cfs\f60\misc", and $newelement is "this test file.csv"
    >(note the space between "this" and "test", and between "test" and "file").
    >
    >I get the following cleartool errors when this command gets executed:
    >"cleartool: Error: Unable to determine view for "test": No such file or
    >directory."
    >"cleartool: Error" Unable to determine view for "file.csv": No such file
    >or directory."
    >
    >Is this a ClearCase problem that's not fixable or is there some way for me
    >to get around this problem?
    >
    >Thanks,
    >Navin
    ><============================================================
    >To unsubscribe, send email to
    >majordomo@lists.us.ibm.com and put these words in the
    >message body: unsubscribe cciug
    >============================================================>

    Try ClearTrigger at http://www.abs-consulting.com

    A Better Solution, Inc.

    Charles Clarke III President
    A Better Solution, Inc. (770) 252-1500 phone
    50 Springridge Ct. (404) 423-9532 mobile *
    Newnan, Ga. 30265 (770) 252-1501 fax
    Email:
    charles@abs-consulting.com
    http://www.abs-consulting.com
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T17:49:06Z  
    Try putting quotes around $newelement. Since this is a Perl script it would look something like: \\\"$newelement\\\"
    Didn't work. I tried using double quotes and then single quotes - same error as before. I'm pasting the full text from my Perl script below (with my added single quotes around $newelement):

    unless (`$CT mkelem -c "Added through AddElt script" -nco -eltype $ElemType $enterDir\\\'$newelement\'`) {
    print "ERROR: on creating the new element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }
  • SystemAdmin
    SystemAdmin
    47293 Posts

    RE:Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T17:51:53Z  
    Didn't work. I tried using double quotes and then single quotes - same error as before. I'm pasting the full text from my Perl script below (with my added single quotes around $newelement):

    unless (`$CT mkelem -c "Added through AddElt script" -nco -eltype $ElemType $enterDir\\\'$newelement\'`) {
    print "ERROR: on creating the new element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }
    Try

    unless (`$CT mkelem -c "Added through AddElt script" -nco -eltype
    $ElemType "$enterDir\\$newelement"`)
    -----Original Message-----
    From: owner-cciug@lists.us.ibm.com mailto:owner-cciug@lists.us.ibm.com
    On Behalf Of nkumar
    Sent: Tuesday, October 25, 2005 1:49 PM
    To: cciug@lists.us.ibm.com
    Subject: cciug Re: Unable to use "mkelem" for files with spaces

    Didn't work. I tried using double quotes and then single quotes - same
    error as before. I'm pasting the full text from my Perl script below
    (with my added single quotes around $newelement):

    unless (`$CT mkelem -c "Added through AddElt script" -nco -eltype
    $ElemType $enterDir\\\'$newelement\'`) {
    print "ERROR: on creating the new element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re:Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T18:00:49Z  
    Didn't work. I tried using double quotes and then single quotes - same error as before. I'm pasting the full text from my Perl script below (with my added single quotes around $newelement):

    unless (`$CT mkelem -c "Added through AddElt script" -nco -eltype $ElemType $enterDir\\\'$newelement\'`) {
    print "ERROR: on creating the new element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }
    Can you provide an example of what $enterDir and
    $newelement contain? It may be that you are
    attempting to add something like
    \vobname\dir1\dir2\vobname\dir1\dir2\file instead of
    just \vobname\dir1\dir2\file

    Marc

    • nkumar <disadmin@us.ibm.com> wrote:

    > Didn't work. I tried using double quotes and then
    > single quotes - same error as before. I'm pasting
    > the full text from my Perl script below (with my
    > added single quotes around $newelement):
    >
    > unless (`$CT mkelem -c "Added through AddElt script"
    > -nco -eltype $ElemType $enterDir\\\'$newelement\'`)
    > {
    > print "ERROR: on creating the new element\n\n";
    > print "Aborting procedure\n\n";
    > exit 0;
    > }
    >
    <============================================================
    > To unsubscribe, send email to
    > majordomo@lists.us.ibm.com and put these words in
    > the
    > message body: unsubscribe cciug
    >
    ============================================================>
    >

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re: Re:Unable to use "mkelem" for files with spaces

    ‏2005-10-25T18:50:31Z  
    Navin,

    Try quoting the element name
    i.e. change

    cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType
    $enterDir\\$newelement

    to

    cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType
    "$enterDir\\$newelement"

    Hope this helps

    -Charles

    Try ClearTrigger, ClearReplica and ClearWeb at http://www.abs-consulting.com

    A Better Solution, Inc.

    Charles Clarke III ClearCase Consultant
    A Better Solution, Inc. (770) 252-1500 phone
    50 Springridge Ct.
    Newnan, Ga. 30265 (770) 252-1501 fax
    Email:
    charles@abs-consulting.com
    http://www.abs-consulting.com

    At 11:13 AM 10/25/2005, nkumar wrote:
    >Hi,
    >I'm using ClearCase for Windows Version 2003.06.10+ and we recently were
    >told by management that we need to store files with spaces in the filename
    >in ClearCase. We have a Perl script that we use to add new elements to
    >ClearCase and it appears to be failing for filenames with spaces. It's
    >failing on the following command:
    >cleartool mkelem -c "Added through AddElt script" -nco -eltype $ElemType
    >$enterDir\\$newelement
    >(note: the variables $ElemType is "text_file", $enterDir is
    >"M:\nkumar_view\cfs\f60\misc", and $newelement is "this test file.csv"
    >(note the space between "this" and "test", and between "test" and "file").
    >
    >I get the following cleartool errors when this command gets executed:
    >"cleartool: Error: Unable to determine view for "test": No such file or
    >directory."
    >"cleartool: Error" Unable to determine view for "file.csv": No such file
    >or directory."
    >
    >Is this a ClearCase problem that's not fixable or is there some way for me
    >to get around this problem?
    >
    >Thanks,
    >Navin
    ><============================================================
    >To unsubscribe, send email to
    >majordomo@lists.us.ibm.com and put these words in the
    >message body: unsubscribe cciug
    >============================================================>

    Try ClearTrigger at http://www.abs-consulting.com

    A Better Solution, Inc.

    Charles Clarke III President
    A Better Solution, Inc. (770) 252-1500 phone
    50 Springridge Ct. (404) 423-9532 mobile *
    Newnan, Ga. 30265 (770) 252-1501 fax
    Email:
    charles@abs-consulting.com
    http://www.abs-consulting.com
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
    Thanks Charles. Does it matter if I put a slash mark prior to the quote? In other words should I be typing the following (see second line):

    unless (`$CT mkelem -c "Added through AddElt script" -nco -eltype $ElemType \"$enterDir\\$newelement\"`) {
    print "ERROR: on creating the new element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }

    Thanks,
    Navin
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re: Re:Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T18:54:25Z  
    Can you provide an example of what $enterDir and
    $newelement contain? It may be that you are
    attempting to add something like
    \vobname\dir1\dir2\vobname\dir1\dir2\file instead of
    just \vobname\dir1\dir2\file

    Marc

    • nkumar <disadmin@us.ibm.com> wrote:

    > Didn't work. I tried using double quotes and then
    > single quotes - same error as before. I'm pasting
    > the full text from my Perl script below (with my
    > added single quotes around $newelement):
    >
    > unless (`$CT mkelem -c "Added through AddElt script"
    > -nco -eltype $ElemType $enterDir\\\'$newelement\'`)
    > {
    > print "ERROR: on creating the new element\n\n";
    > print "Aborting procedure\n\n";
    > exit 0;
    > }
    >
    <============================================================
    > To unsubscribe, send email to
    > majordomo@lists.us.ibm.com and put these words in
    > the
    > message body: unsubscribe cciug
    >
    ============================================================>
    >

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
    Hi Marc,

    I actually included this info at the beginning of my thread, however I'll paste it below for your convenience:
    (note: the variables $ElemType is "text_file", $enterDir is "M:\nkumar_view\cfs\f60\misc", and $newelement is "this test file.csv" (note the space between "this" and "test", and between "test" and "file").

    Thanks,
    Navin
  • SystemAdmin
    SystemAdmin
    47293 Posts

    RE:Re: Re:Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T18:57:08Z  
    Hi Marc,

    I actually included this info at the beginning of my thread, however I'll paste it below for your convenience:
    (note: the variables $ElemType is "text_file", $enterDir is "M:\nkumar_view\cfs\f60\misc", and $newelement is "this test file.csv" (note the space between "this" and "test", and between "test" and "file").

    Thanks,
    Navin
    Any chance you could do the following prior to your "unless" command?
    That might tell you what's wrong.

    print qq'$CT mkelem -c "Added through AddElt script" -nco -eltype
    $ElemType \"$enterDir\\$newelement\"\n";
    -----Original Message-----
    From: owner-cciug@lists.us.ibm.com mailto:owner-cciug@lists.us.ibm.com
    On Behalf Of nkumar
    Sent: Tuesday, October 25, 2005 2:54 PM
    To: cciug@lists.us.ibm.com
    Subject: cciug Re: Re:Re: Unable to use "mkelem" for files with spaces

    Hi Marc,

    I actually included this info at the beginning of my thread, however
    I'll paste it below for your convenience:
    (note: the variables $ElemType is "text_file", $enterDir is
    "M:\nkumar_view\cfs\f60\misc", and $newelement is "this test file.csv"
    (note the space between "this" and "test", and between "test" and
    "file").

    Thanks,
    Navin
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re: RE:Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T18:59:30Z  
    Try

    unless (`$CT mkelem -c "Added through AddElt script" -nco -eltype
    $ElemType "$enterDir\\$newelement"`)
    -----Original Message-----
    From: owner-cciug@lists.us.ibm.com mailto:owner-cciug@lists.us.ibm.com
    On Behalf Of nkumar
    Sent: Tuesday, October 25, 2005 1:49 PM
    To: cciug@lists.us.ibm.com
    Subject: cciug Re: Unable to use "mkelem" for files with spaces

    Didn't work. I tried using double quotes and then single quotes - same
    error as before. I'm pasting the full text from my Perl script below
    (with my added single quotes around $newelement):

    unless (`$CT mkelem -c "Added through AddElt script" -nco -eltype
    $ElemType $enterDir\\\'$newelement\'`) {
    print "ERROR: on creating the new element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
    This appears to work, however I'm not sure if I should put a slash immediately preceding the quotes (i.e. \"$enterDir\\$newelement\".

    I have many more occurrences of the $enterDir\\$newelement statements throughout my Perl scripts and triggers, some with slight variations such as $enterDir\\$newelement@@\\main\\0
    therefore I'll probably need to put quotes around these as well such that it now reads:
    \"$enterDir\\$newelement@@\\main\\0\"
  • SystemAdmin
    SystemAdmin
    47293 Posts

    RE:Re: RE:Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T19:01:56Z  
    This appears to work, however I'm not sure if I should put a slash immediately preceding the quotes (i.e. \"$enterDir\\$newelement\".

    I have many more occurrences of the $enterDir\\$newelement statements throughout my Perl scripts and triggers, some with slight variations such as $enterDir\\$newelement@@\\main\\0
    therefore I'll probably need to put quotes around these as well such that it now reads:
    \"$enterDir\\$newelement@@\\main\\0\"
    I don't believe you need a slash around the quotes, because you don't
    have outer quotes that would conflict with the ones for the filename.

    -----Original Message-----
    From: owner-cciug@lists.us.ibm.com mailto:owner-cciug@lists.us.ibm.com
    On Behalf Of nkumar
    Sent: Tuesday, October 25, 2005 3:00 PM
    To: cciug@lists.us.ibm.com
    Subject: cciug Re: RE:Re: Unable to use "mkelem" for files with spaces

    This appears to work, however I'm not sure if I should put a slash
    immediately preceding the quotes (i.e. \"$enterDir\\$newelement\".

    I have many more occurrences of the $enterDir\\$newelement statements
    throughout my Perl scripts and triggers, some with slight variations
    such as $enterDir\\$newelement@@\\main\\0
    therefore I'll probably need to put quotes around these as well such
    that it now reads:
    \"$enterDir\\$newelement@@\\main\\0\"
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re: RE:Re: Re:Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T19:42:28Z  
    Any chance you could do the following prior to your "unless" command?
    That might tell you what's wrong.

    print qq'$CT mkelem -c "Added through AddElt script" -nco -eltype
    $ElemType \"$enterDir\\$newelement\"\n";
    -----Original Message-----
    From: owner-cciug@lists.us.ibm.com mailto:owner-cciug@lists.us.ibm.com
    On Behalf Of nkumar
    Sent: Tuesday, October 25, 2005 2:54 PM
    To: cciug@lists.us.ibm.com
    Subject: cciug Re: Re:Re: Unable to use "mkelem" for files with spaces

    Hi Marc,

    I actually included this info at the beginning of my thread, however
    I'll paste it below for your convenience:
    (note: the variables $ElemType is "text_file", $enterDir is
    "M:\nkumar_view\cfs\f60\misc", and $newelement is "this test file.csv"
    (note the space between "this" and "test", and between "test" and
    "file").

    Thanks,
    Navin
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
    Kathy,

    I'm actually able to get past the mkelem command successfully now using the quotes as you suggested. However I'm now stuck at the point in my script where the checkout is done (see below):

    unless (`$CT checkout -nc \"$enterDir\\$newelement\"`) {
    print "ERROR: on checking out the element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }

    Can I use the same "print qq" statement prior to this "unless command"? If so then how would this "print qq" statement look like?
    What does the "print qq" statement do?

    Thanks for your help!

    Navin
  • SystemAdmin
    SystemAdmin
    47293 Posts

    RE:Re: RE:Re: Re:Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T19:47:25Z  
    Kathy,

    I'm actually able to get past the mkelem command successfully now using the quotes as you suggested. However I'm now stuck at the point in my script where the checkout is done (see below):

    unless (`$CT checkout -nc \"$enterDir\\$newelement\"`) {
    print "ERROR: on checking out the element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }

    Can I use the same "print qq" statement prior to this "unless command"? If so then how would this "print qq" statement look like?
    What does the "print qq" statement do?

    Thanks for your help!

    Navin
    I take it you aren't familiar with quoting in Perl. Using qq'...' is a
    way of using a different quote character to mean a double-quote so it
    can be distinguished from other double-quotes that have to be literal
    (as in a Dos command). You can use any character or pair, such as
    qqhttp://.... or qq!....! as long as they "match".

    The print statement is a dumb debugging technique that will tell you if
    you have the syntax right, so you can cut and paste it and run it
    manually.
    -----Original Message-----
    From: owner-cciug@lists.us.ibm.com mailto:owner-cciug@lists.us.ibm.com
    On Behalf Of nkumar
    Sent: Tuesday, October 25, 2005 3:42 PM
    To: cciug@lists.us.ibm.com
    Subject: cciug Re: RE:Re: Re:Re: Unable to use "mkelem" for files with
    spaces

    Kathy,

    I'm actually able to get past the mkelem command successfully now using
    the quotes as you suggested. However I'm now stuck at the point in my
    script where the checkout is done (see below):

    unless (`$CT checkout -nc \"$enterDir\\$newelement\"`) {
    print "ERROR: on checking out the element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }

    Can I use the same "print qq" statement prior to this "unless command"?
    If so then how would this "print qq" statement look like?
    What does the "print qq" statement do?

    Thanks for your help!

    Navin
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>

    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>
  • SystemAdmin
    SystemAdmin
    47293 Posts

    Re: Unable to use "mkelem" for files with spaces

    ‏2005-10-25T23:55:55Z  
    Kathy,

    I'm actually able to get past the mkelem command successfully now using the quotes as you suggested. However I'm now stuck at the point in my script where the checkout is done (see below):

    unless (`$CT checkout -nc \"$enterDir\\$newelement\"`) {
    print "ERROR: on checking out the element\n\n";
    print "Aborting procedure\n\n";
    exit 0;
    }

    Can I use the same "print qq" statement prior to this "unless command"? If so then how would this "print qq" statement look like?
    What does the "print qq" statement do?

    Thanks for your help!

    Navin
    On Tue, Oct 25, 2005 at 03:42:28PM -0400, nkumar wrote:
    > Kathy,
    >
    > I'm actually able to get past the mkelem command successfully now using the quotes as you suggested. However I'm now stuck at the point in my script where the checkout is done (see below):
    >
    > unless (`$CT checkout -nc \"$enterDir\\$newelement\"`) {
    > print "ERROR: on checking out the element\n\n";
    > print "Aborting procedure\n\n";
    > exit 0;
    > }

    I'd shy away from using backticks here. The layers of quoting are generally
    too confusing. Instead, I'd use the list form of system, to avoid shell
    expansion. If you really need the output from the command, then the list
    form of open will do. You can do the same for your mkelem command.

    $element_path = "$enterDir\\$newelement";

    1. system method

    system($CT, qw(checkout -nc), $element_path);
    if ($?) {
    # error checking here
    }

    1. open method

    open(CHECKOUT, '-|', $CT, qw(checkout -nc), $element_path)
    or die "Couldn't open pipe to cleartool co $!";
    while (defined($_=<CHECKOUT>)) {
    # handle output here
    }
    close CHECKOUT; # check for errors here, too, perhaps

    Robert Au rau@lsil.com
    <============================================================
    To unsubscribe, send email to
    majordomo@lists.us.ibm.com and put these words in the
    message body: unsubscribe cciug
    ============================================================>