Skip to content

Instantly share code, notes, and snippets.

@alfredmyers
Created November 1, 2018 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredmyers/6cca18d09d7f8578a211f2f6b212f275 to your computer and use it in GitHub Desktop.
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
Copy link
Author

alfredmyers commented Nov 1, 2018

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