File: sendmail.hs

package info (click to toggle)
darcs 2.18.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,960 kB
  • sloc: haskell: 47,748; sh: 13,466; ansic: 447; perl: 134; makefile: 8
file content (16 lines) | stat: -rw-r--r-- 336 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import System.Environment

main = do
  args <- getArgs
  let filename = args !! 5
  input <- getContents
  filecontent <- readFile filename
  writeFile "saved.out" $
    unlines $
    [ "arg["++show i++"] = "++v | (i,v) <- zip [1..] args ]
    ++
    [ "input contains:"
    , input
    , filename++" contains:"
    , filecontent
    ]