Powershell converts text into a table,

Source: Internet
Author: User

Powershell converts text into a table,

$ Text = "1 fantasy westward journey 216406 2014-01-21 data piece 2 hearth stone legend 15905 Public Beta 3 new westward journey 214465 Public Beta 4 ask 11322 10094 10056 shenwu 10011 2010-09-17 Public Beta 8 man Q Chuan 9576 2014-06-27 internal Beta 9 goddess Three Kingdoms 9343 2014-06-28 internal beta 10 champion showdown 8809 2014-04-23 Public Beta 11 I want to seal a day 4447 2014-07-05 Public Beta 12 Taoyuan will star record 4324 2012-05-24 Public Beta 13 Feng Shen 3899 2011-11-24 public test 14 excellent spirit legend 3779 2013-07-20 internal test 15 fantasy Sui and Tang 3462 2014-07-11 public test 16 peach blossom source note 3289 2013-06-21 internal test 17 Condor Heroes 3112 2012-09-20 public test 18 westward journey community 2516 2012-08-31 limited internal test 19 fantasy legend 22421 fairy public test 20 Three Kingdoms 2313 2010-04-28 internal test "$ t1 = @() $ text. split ("'n'", [StringSplitOptions]: RemoveEmptyEntries) | % {$ game = "" | select ranking, game name, heat value, date, status, remarks $ game. ranking = $ _. split () [0] $ game. game name =$ _. split () [1] $ game. heat value = $ _. split () [2] $ game. date = $ _. split () [3] $ game. status = $ _. split () [4] $ t1 + = $ game} $ t1 | Export-Csv "games.csv"-not-Enc oem




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.