code_junkie

escaping 'run' command line options in cygwin

Nov 14th, 2011
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. run C:foo.exe /BUILD
  2.  
  3. run "C:foo.exe /BUILD"
  4.  
  5. Windows programs are either GUI programs or console programs. When
  6. started console programs will either attach to an existing console
  7. or create a new one. GUI programs can never attach to an exiting con-
  8. sole. There is no way to attach to an existing console but hide it if
  9. started as GUI program.
  10.  
  11. run will do this for you. It works as intermediate and starts a pro-
  12. gram but makes the console window hidden.
  13.  
  14. </cygdrive/d/sandbox> $ run ls -la
  15. </cygdrive/d/sandbox> $
  16.  
  17. </cygdrive/d/sandbox> $ cat foo.lst
  18. cat: foo.lst: No such file or directory
  19. </cygdrive/d/sandbox> $ run ls -la >foo.lst
  20. </cygdrive/d/sandbox> $
  21. </cygdrive/d/sandbox> $ cat foo.lst
  22. total 9272280
  23. drwx------+ 15 jcasadonte ???????? 0 Feb 7 10:39 .
  24. drwxrwxr-x+ 14 Administrators SYSTEM 0 Feb 7 00:44 ..
  25. -rwx------+ 1 jcasadonte ???????? 26300 Apr 10 2006 ATT01779.jpg
  26. [...etc...]
Add Comment
Please, Sign In to add comment