Casual Articles
#1 in Business Subscribe Email Print

You are here: Home > Computers and Technology > Software > VBScript - Printing Results to the Commandline for Flexibility

Tags

  • michigan
  • wysiayg
  • suppose
  • script processing
  • certain criteria

  • Links

  • Corporate Event Ideas
  • Wireless Network Diagram
  • Wedding Cakes: Deciding on the Edible Art that Dresses Your Wedding Reception
  • Casual Articles - VBScript - Printing Results to the Commandline for Flexibility

    Michigan Truck Accident Lawyers
    A lawyer is a person who is licensed by the relevant statutory authorities to impart legal advice to clients in legal matters and represent them in courts of law. Most countries today require professional law advisors in their judicial systems.The practicing lawyers in Michigan are usually members of the state bar of Michigan, and are licensed by the State of Michigan to practice law. Even though all the
    r script processes this file working out the dollar amount of our food bill by accessing the prices of food on a database. We want a bill for all of the animals listed in order of their name. We do not want any animals which eat Fish or Fish flakes. We can process our data like this:

    cscript //nologo file_in.txt | | find /V "Fish" | sort > my_file.csv

    The result of our script processing the dollar cost and printing its CSV output is:

    • Elephant,Popcorn,$900
    • Giraffe,Leaves,$450
    • Lion
      Secretes of Dealing with Recruitment Agencies
      There are lots and lots of specialty sites out there on the Net and I’m talking about job sites. You can find sites for part-time workers, office workers, team workers, temporary and contract workers. You can also go into recruitment sites and enlist their support and help.Dealing with the recruitment site. Firstly you need to no that they usually charge fees for their service. However, it can reduce your
      Often, when a script writes results to a file, the output file's path and name are hard-coded into the script or passed to the script as an Argument. Any further processing of the resulting data must read in data from a file and access the disk again. This limits our ability to use other Commandline tools forcing us to duplicate effort by writing Heap Sort routines instead of using DOS's Sort command and so on.

      Eliminating the ability of our scripts to write output directly to a file increases the flexibility in the ways our scripts can be used. Our scripts should write any processed output to the Command Line Interface (CLI). For example, let's say we already have a script called Transform.vbs which transforms data in one file and sends the processed results to another file. Originally we may have had to provide both the input file and the output file as arguments (if we didn't hard-code the output file within our script).

      cscript //nologo file_in.txt file_out.csv

      So it does its job. But it really is WYSIAYG (what-you-see-is-all-you-get!). If our script wrote its processed results directly to the CLI then we could write the following:

      cscript //nologo file_in.txt > my_file.csv

      Seems like a small change doesn't it? But with the added flexibility we can now further process the results using DOS or other CLI tools. Suppose we wanted to sort the results A-Z aswell:

      cscript //nologo file_in.txt | sort > my_file.csv

      Perhaps we want to filter results based upon certain criteria and sort them A-Z:

      cscript //nologo file_in.txt | find "my criteria" | sort > my_file.csv

      We can do more. Say we have a file listing zoo animal details:

      • Cage=1, Animal=Monkey, Food=Bananas, Count=6
      • Cage=2, Animal=Giraffe, Food=Leaves, Count=2
      • Cage=3, Animal=Elephant, Food=Popcorn, Count=3
      • Cage=4, Animal=Prawn, Food=Fish flakes, Count=100
      • Cage=5, Animal=Lion, Food=Pedestrians, Count=20
      • Cage=6, Animal=Scorpion, Food=Chicken, Count=25
      • Cage=7, Animal=Otter, Food=Fish, Count=12

      Our script processes this file working out the dollar amount of our food bill by accessing the prices of food on a database. We want a bill for all of the animals listed in order of their name. We do not want any animals which eat Fish or Fish flakes. We can process our data like this:

      cscript //nologo file_in.txt | | find /V "Fish" | sort > my_file.csv

      The result of our script processing the dollar cost and printing its CSV output is:

      • Elephant,Popcorn,$900
      • Giraffe,Leaves,$450
      • Lion,
        Transcription - An Explanation
        If your wondering what exactly the word Transcription means, then you are at the right place to check this out. Lets not make it very complicated and put this in simple words. Transcription is nothing but converting recorded audio or video dictations into written form. The basic idea of transcribing is to listen something in a spoken version and have the ability to type the same into a document for future refere
        s our scripts can be used. Our scripts should write any processed output to the Command Line Interface (CLI). For example, let's say we already have a script called Transform.vbs which transforms data in one file and sends the processed results to another file. Originally we may have had to provide both the input file and the output file as arguments (if we didn't hard-code the output file within our script).

        cscript //nologo file_in.txt file_out.csv

        So it does its job. But it really is WYSIAYG (what-you-see-is-all-you-get!). If our script wrote its processed results directly to the CLI then we could write the following:

        cscript //nologo file_in.txt > my_file.csv

        Seems like a small change doesn't it? But with the added flexibility we can now further process the results using DOS or other CLI tools. Suppose we wanted to sort the results A-Z aswell:

        cscript //nologo file_in.txt | sort > my_file.csv

        Perhaps we want to filter results based upon certain criteria and sort them A-Z:

        cscript //nologo file_in.txt | find "my criteria" | sort > my_file.csv

        We can do more. Say we have a file listing zoo animal details:

        • Cage=1, Animal=Monkey, Food=Bananas, Count=6
        • Cage=2, Animal=Giraffe, Food=Leaves, Count=2
        • Cage=3, Animal=Elephant, Food=Popcorn, Count=3
        • Cage=4, Animal=Prawn, Food=Fish flakes, Count=100
        • Cage=5, Animal=Lion, Food=Pedestrians, Count=20
        • Cage=6, Animal=Scorpion, Food=Chicken, Count=25
        • Cage=7, Animal=Otter, Food=Fish, Count=12

        Our script processes this file working out the dollar amount of our food bill by accessing the prices of food on a database. We want a bill for all of the animals listed in order of their name. We do not want any animals which eat Fish or Fish flakes. We can process our data like this:

        cscript //nologo file_in.txt | | find /V "Fish" | sort > my_file.csv

        The result of our script processing the dollar cost and printing its CSV output is:

        • Elephant,Popcorn,$900
        • Giraffe,Leaves,$450
        • Lion
          Debt Management UK
          The debt management programs available in the UK are mainly intended to help liberate individuals who feel the heavy burden of debts, and to get them on their way to financial freedom, so that they don’t ever get trapped by debts again.There are a lot of debt management companies willing to extend their services to people in the United Kingdom. Their services include: income and expenditure assessment, s
          l-you-get!). If our script wrote its processed results directly to the CLI then we could write the following:

          cscript //nologo file_in.txt > my_file.csv

          Seems like a small change doesn't it? But with the added flexibility we can now further process the results using DOS or other CLI tools. Suppose we wanted to sort the results A-Z aswell:

          cscript //nologo file_in.txt | sort > my_file.csv

          Perhaps we want to filter results based upon certain criteria and sort them A-Z:

          cscript //nologo file_in.txt | find "my criteria" | sort > my_file.csv

          We can do more. Say we have a file listing zoo animal details:

          • Cage=1, Animal=Monkey, Food=Bananas, Count=6
          • Cage=2, Animal=Giraffe, Food=Leaves, Count=2
          • Cage=3, Animal=Elephant, Food=Popcorn, Count=3
          • Cage=4, Animal=Prawn, Food=Fish flakes, Count=100
          • Cage=5, Animal=Lion, Food=Pedestrians, Count=20
          • Cage=6, Animal=Scorpion, Food=Chicken, Count=25
          • Cage=7, Animal=Otter, Food=Fish, Count=12

          Our script processes this file working out the dollar amount of our food bill by accessing the prices of food on a database. We want a bill for all of the animals listed in order of their name. We do not want any animals which eat Fish or Fish flakes. We can process our data like this:

          cscript //nologo file_in.txt | | find /V "Fish" | sort > my_file.csv

          The result of our script processing the dollar cost and printing its CSV output is:

          • Elephant,Popcorn,$900
          • Giraffe,Leaves,$450
          • Lion
            Google Sitemaps - A New Free Google Tool
            Google has released another valuable. The tool, “Sitemaps”, allows you to notify Google of site updates. As with all Google tools, the service is free.Sitemaps – What Is It?Sitemaps is a platform that let’s Webmasters notify Google of, ta da, changes to a site. In creating the tool, Google suggests the tool will let it expand coverage of pages on the web and speed up the time it takes to index site
            find "my criteria" | sort > my_file.csv

            We can do more. Say we have a file listing zoo animal details:

            • Cage=1, Animal=Monkey, Food=Bananas, Count=6
            • Cage=2, Animal=Giraffe, Food=Leaves, Count=2
            • Cage=3, Animal=Elephant, Food=Popcorn, Count=3
            • Cage=4, Animal=Prawn, Food=Fish flakes, Count=100
            • Cage=5, Animal=Lion, Food=Pedestrians, Count=20
            • Cage=6, Animal=Scorpion, Food=Chicken, Count=25
            • Cage=7, Animal=Otter, Food=Fish, Count=12

            Our script processes this file working out the dollar amount of our food bill by accessing the prices of food on a database. We want a bill for all of the animals listed in order of their name. We do not want any animals which eat Fish or Fish flakes. We can process our data like this:

            cscript //nologo file_in.txt | | find /V "Fish" | sort > my_file.csv

            The result of our script processing the dollar cost and printing its CSV output is:

            • Elephant,Popcorn,$900
            • Giraffe,Leaves,$450
            • Lion
              For Hassle Free Business Loans Try Online Business Loans
              With the arrival of internet and the other services it has become easy for many people to carry out their operations with relatively higher amount of security. The same applies to the banks and their banking services the people can now apply for loans online and can the wide variety of benefits and services.Taking a business loan can be a complicated affair, which is why it is always advisable to go in fo
              r script processes this file working out the dollar amount of our food bill by accessing the prices of food on a database. We want a bill for all of the animals listed in order of their name. We do not want any animals which eat Fish or Fish flakes. We can process our data like this:

              cscript //nologo file_in.txt | | find /V "Fish" | sort > my_file.csv

              The result of our script processing the dollar cost and printing its CSV output is:

              • Elephant,Popcorn,$900
              • Giraffe,Leaves,$450
              • Lion,Pedestrians,$850
              • Monkey,Bananas,$300
              • Scorpion,Chicken,$250

              With a little imagination we can extend this to print out results via the Notepad application using Notepad's [/P] switch. So now we have:

              cscript //nologo file_in.txt | | find /V "Fish" | sort > my_file.csv&sleep 3000¬epad /p my_file.csv

              Here is an example where we process multiple files (We don't print them though):

              for %i in (*.txt) do cscript //nologo %i | find /V "Fish" | sort >> my_file.csv

              All this flexibility is available to us when we forgo writing directly to a file from our script and print results directly to the CLI instead.

    HTTP = HTML link (for blogs, profiles,phorums):
    <a href="http://www.casualarticles.com/article/177890/casualarticles-VBScript--Printing-Results-to-the-Commandline-for-Flexibility.html">VBScript - Printing Results to the Commandline for Flexibility</a>

    BB link (for phorums):
    [url=http://www.casualarticles.com/article/177890/casualarticles-VBScript--Printing-Results-to-the-Commandline-for-Flexibility.html]VBScript - Printing Results to the Commandline for Flexibility[/url]

    Related Articles:

    Internet Marketing Strategy Planning - The Eight Steps Formula

    Link Panhandlers Begging for Links on Street Corners - Get a Job!

    Starting a Freelance Writing Career (or How I Sifted Through the Muck and Found My Way)

    Bookmark it: del.icio.us digg.com reddit.com netvouz.com google.com yahoo.com technorati.com furl.net bloglines.com socialdust.com ma.gnolia.com newsvine.com slashdot.org simpy.com shadows.com blinklist.com