How to pipe specific cmd output line to another batch?
For example:
command DSQUERY USER -samid *loginname* | DSGET USER -loscr
It finds what user in AD has in his Logon script field, what is actual login script name. I want to pipe this output to another batch file which opens login script file for this specific user.
BUT output of the above command outputs three lines:
loscr
"script name"
dsget succeeded
How to suppress first and third lines and to pipe only output from second line?!
Thanks.
?