Skip to content

Instantly share code, notes, and snippets.

@alfredmyers
Created November 1, 2018 12:16
Show Gist options
  • Select an option

  • Save alfredmyers/6cca18d09d7f8578a211f2f6b212f275 to your computer and use it in GitHub Desktop.

Select an option

Save alfredmyers/6cca18d09d7f8578a211f2f6b212f275 to your computer and use it in GitHub Desktop.
Enumerates an prints argument values out to the console
using System;
class Program
{
static void Main(string[] args)
{
foreach (var arg in args)
{
Console.WriteLine(arg);
}
}
}
@alfredmyers

alfredmyers commented Nov 1, 2018

Copy link
Copy Markdown
Author

Run the program above in bash, cmd and Powershell to see how bash does wild card expansion before feeding the arguments into your program

dotnet run -- *

Powershell, cmd.exe:

*

Bash:

BashGlobbing.csproj
bin
obj
Program.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment