Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ハッケージを触ってみる #1

Open
3 tasks done
daigoro22 opened this issue May 16, 2022 · 2 comments
Open
3 tasks done

ハッケージを触ってみる #1

daigoro22 opened this issue May 16, 2022 · 2 comments

Comments

@daigoro22
Copy link
Owner

daigoro22 commented May 16, 2022

ifconfigラッパー

  • 以下のハッケージを使ってみる
    • System.Process.createProcess
    • System.IO.hGetContents
@daigoro22
Copy link
Owner Author

<-の使い方がわからないよ

@daigoro22
Copy link
Owner Author

import System.Process
import System.IO

someFunc :: IO ()
someFunc = do
    (_, Just hOut, _, _) <- createProcess (proc "ifconfig" []) { std_out = CreatePipe }
    text <- hGetContents hOut
    putStrLn text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant