How to use the 'ExecuteShell','execv','execvp' open the 'forum.dlang.org'?

FrankLike via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 12 23:16:49 PDT 2014


If you offen open the  'forum.dlang.org',always want to open the 
web quickly,
but how to use the 'ExecuteShell','execv','execvp' open the 
'forum.dlang.org'?

module main;

import std.process,std.stdio;

void main()
{
	const string[] urls =["http://localhost:8080"];
	const string  s ="iexplore.exe";
	execv(s,urls);
	string url = "iexplore.exe http://forum.dlang.org/";
	auto i =executeShell(url);//escapeShellCommand("wget", url)
	if(i.status !=0) writeln("fail open:",i);
	else writeln(i.output);
}

Thank you.



More information about the Digitalmars-d-learn mailing list