fork(1) download
  1. using System;
  2. using System.IO;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. Console.WriteLine(System.Environment.OSVersion);
  9.  
  10. string dir = @"/usr/bin";
  11. string filename = "vim";
  12. Console.WriteLine(Path.Combine(dir, filename));
  13.  
  14. dir = @"/usr/bin/";
  15. Console.WriteLine(Path.Combine(dir, filename));
  16.  
  17. dir = @"bin";
  18. Console.WriteLine(Path.Combine(dir, filename));
  19. }
  20. }
Success #stdin #stdout 0.03s 33960KB
stdin
Standard input is empty
stdout
Unix 2.6.34.0
/usr/bin/vim
/usr/bin/vim
bin/vim