It's all about the answers!

Ask a question

How to pipeout the SCM CLI results (eg.listing locks in a stream)?


vijayakumar ramesh (109848) | asked Feb 14 '17, 5:44 a.m.

I am trying to list all the file locks in a stream, from SCM CLI. I am unable to pipeout the results.Suggestions please.
Find the below image

One answer



permanent link
Shashikant Padur (4.0k27) | answered Feb 14 '17, 6:33 a.m.
JAZZ DEVELOPER

Looks like you are not using the regular command shell... probably powershell?

This may work: cmd /c lscm ls locks  -r local -s 1109 -m 10 '> file.txt 2'>'&1


Comments
vijayakumar ramesh commented Feb 15 '17, 5:31 a.m. | edited Feb 15 '17, 5:44 a.m.

I tried your command and other forms of it but it didnt work.. point me where I am  going wrong.
Are you sure that out put of SCM CLI can be written to file ?

 


vijayakumar ramesh commented Feb 15 '17, 5:32 a.m.

I am using the regular command shell.


Shashikant Padur commented Feb 15 '17, 10:30 p.m.
JAZZ DEVELOPER

 The command I listed out was to be used with the powershell. Piping is nothing to do with scm cli and yes it works.


Donald Nong commented Feb 16 '17, 3:22 a.m.

Vija, if using a regular command shell, simply remove all the single quote sign in the command, so the end of the command looks like: > file.txt 2>&1

Your answer


Register or to post your answer.