header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Redirecting data
Last Post 28 Feb 2010 08:19 AM by 0ptikGhost. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
tomazUser is Offline
New Member
New Member
Posts:3
Avatar

--
27 Feb 2010 09:19 AM
    Hello! I would like to redirect my output data into two files, something like that: data > dip.txt and also data >> dip2.txt. Is this possible? Thank you in advance
    0ptikGhostUser is Offline
    Basic Member
    Basic Member
    Posts:296
    Avatar

    --
    28 Feb 2010 08:19 AM
    Posted By tomaz on 27 Feb 2010 09:19 AM
    Hello! I would like to redirect my output data into two files, something like that: data > dip.txt and also data >> dip2.txt. Is this possible? Thank you in advance


    Could could do exactly that into lines if your data is already in a $data variable:
    $data > dip.txt
    $data >> dip2.txt
    
    If it is not in a variable and you'd rather do it one pipeline then perhaps the following will work:
    data | Tee-Object dip.txt | Out-File dip2.txt -Append
    
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer