How to use shell commands in c program
Instantly share code, notes, and snippets. Created May 11, Code Revisions 1 Stars 67 Forks Embed What would you like to do? Embed Embed this gist in your website. Share Copy sharable link for this gist. Learn more about clone URLs. Download ZIP. Simple shell in C. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below.
Asked 6 years, 6 months ago. Active 6 years, 5 months ago. Viewed 10k times. Shivam Upadhyay. Shivam Upadhyay Shivam Upadhyay 79 1 1 silver badge 6 6 bronze badges. You want to run a DOS command on unix? You must be specific too, do you want to handle the output of the program? Example usage: system "dir" ; — R Sahu. No not on Unix sorry. Just plain C program on windows to run dos commands like say dir,del,creating a file and everything else I am just learning now so don't really have to do much with the output Running those commands is all I need as of now — Shivam Upadhyay.
You are asking how to run shell commands on the Windows shell Command Prompt or "cmd. I am really starting from scratch here — Shivam Upadhyay. Show 4 more comments. Active Oldest Votes. This should run and add any parameter you like in the newArg string.
Show 3 more comments. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related
0コメント