Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- handle_req()
- {
- echo -e "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n"
- echo -e "<html><h1>Hello World</h1></html>"
- }
- typeset -fx handle_req
- handle_req
- nc -l -p 8181 -c "handle_req"
- Iese pe consola: HTTP/1.1 nuştiuce, deci funcţia merge
- Iese către browser: sh: handle_req: not found
Add Comment
Please, Sign In to add comment