Skip to main content
1-Visitor
Oct 21, 2014 6:50 PM UTC
Question

Using a dash "-" in cli script

Is there a way to use a dash "-" in a CLI script?

When I try to create a field using

im createfield --name=Test --type=shorttext --description="Test - blah blah"

returns an error "MKS124818: No option name or letter was found in "-".

The error goes away when I enter:

im createfield --name=Test --type=shorttext --description="Test blah blah"

Is there a way to embed the character or something?

    10 replies

    12-Amethyst
    Oct 21, 2014 7:07 PM UTC

    I quickly tested the command and it did operate as designed (as you verified as well).

    When you copy and paste the exact command from the script into another editor or regular file, is it copying all of the text appropriately? By chance are there smart quotes found in the original script? What language is the script written in?

    Translate
    DanR.1-VisitorAuthor
    1-Visitor
    Oct 21, 2014 7:23 PM UTC

    I typed the command into the command line. Original script? I'm simply trying to create a field via the command line and want to use a dash in the description. What Langauge? MKS Integrity 2009.

    Translate
    21-Topaz I
    Oct 21, 2014 7:55 PM UTC

    Is this running in a Linux command shell? If so, which one is it and have you tried a different one? I had seen something similar a couple years ago where commands run on AIX were not accepting dashes in the parameters.

    Translate