Guest User

Untitled

a guest
Jul 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. handle_req()
  4. {
  5. echo -e "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n"
  6. echo -e "<html><h1>Hello World</h1></html>"
  7. }
  8.  
  9. typeset -fx handle_req
  10.  
  11. handle_req
  12. nc -l -p 8181 -c "handle_req"
  13.  
  14.  
  15. Iese pe consola: HTTP/1.1 nuştiuce, deci funcţia merge
  16. Iese către browser: sh: handle_req: not found
Add Comment
Please, Sign In to add comment