Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12488

Re: Need help with the im command-line and arguments with

$
0
0

Hello Sean,

 

Just to clarify, what I think you are saying is that you have a batch script that you want to have a Summary that looks something like this:

Some data

Other data

But when you try to enter it from the command line, every way you can think of to render a new-line breaks the command into two lines?

 

I'm going to quote myself from this other thread:

If you're trying to do this on a Windows workstation there is no trivial answer.  As far as I can tell (I'm more of a Linux expert than a Windows expert) this is because there is no good way to escape the arguments.  After some web searching, I believe these two articles seem to delve into this topic the best:

 

Fortunately, modern releases of Windows have a new CLI:  PowerShell.  If you try to do this in PowerShell, this should work:

integrity editmksdomaingroup --hostname=kvmcentos --user=kladmin --description="line1`r`nline2" analysts

 

 

If you're actually on a Unix-like workstation, this should be much easier.  You should be able to do something like:

integrity editmksdomaingroup --hostname=kvmcentos --user=kladmin --description="`printf line1\nline2`" analysts

At least, I think you should.  I haven't tested that.

So the option seem to be:

  • Use PowerShell scripts instead of batch files
  • Use a Unix shell such as sh, ksh, or bash
  • Use the API

If someone else has found a better way to do this, I would very much like to hear about it.

 

Regards,
Kael


Viewing all articles
Browse latest Browse all 12488

Trending Articles