Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirection Question.

Status
Not open for further replies.

rayeni

MIS
Dec 13, 2002
13
US
Hello,

Is there a way to redirect only the last two lines of command output to a text file, instead of all of the command's output?
 
Hi,

which command are you running?

this is possible using find option.

e.g.
If i run ipconfig /all command and i want output of physical address in text file then you can use find parameter to do that

that is you can run command like this

ipconfig /all|find/I "physical Addresss" >output.txt


this will give physical address in output.txt nothing else.

Hope this helps
Aslam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top