The cat command is one of the most frequently used commands on Linux/Unix like operating systems. Needless to say it could also be very useful on your Windows system.
Here is the C# code to create your own cat command...
Program.cs:
using System;
namespace cat {
class Program {
static void Main(string[] args) {
if (null != args && args.Length > 0) {
foreach (string arg in args) {
if (System.IO.File.Exists(arg)) {
Console.Write(System.IO.File.ReadAllText(arg));
Console.Write(Environment.NewLine);
}
}
}
}
}
}
The usage should be mostly the same as with it’s Unix counterpart.
To learn more see The cat Command.