open a browser from the command line, wait a few seconds, and shut it. (ie, translate forking from bash to haskell)

I have a bash script that opens a browser for a few seconds, and then closes it. Could someone point me up the equivelant(s) in haskell, h4sh, hsh, etc,0 and friends? I reckon this amounts to, what's the process for translating forking from bash to haskell. ******** #!/bin/bash konqueror http://www.google.com & pid=$! # give the page some time to load sleep 5 kill $pid ******** By the way, this isn't an academic question -- I'm using this simple script to verify various html downloads by checking the konqueror html cache for text strings I'm interested in, for pages that can't be easily downloaded with wget/web mechanize because of javascript and redirect nastiness. Also, for those interested in shell-equivelance strategies, I posted essentially the same question to perlmonks at http://perlmonks.org/?node_id=603868

tphyahoo:
I have a bash script that opens a browser for a few seconds, and then closes it.
Could someone point me up the equivelant(s) in haskell, h4sh, hsh, etc,0 and friends?
I reckon this amounts to, what's the process for translating forking from bash to haskell.
********
#!/bin/bash konqueror http://www.google.com & pid=$! # give the page some time to load sleep 5 kill $pid
********
Something like: import System.Posix main = do p <- run "xclock" [] sleep 5 signalProcess sigTERM p r <- getProcessStatus True False p print r run x args = forkProcess $ executeFile x True args Nothing ? -- Don
participants (2)
-
dons@cse.unsw.edu.au
-
Thomas Hartman