Hacker Newsnew | past | comments | ask | show | jobs | submit | LittleLily's commentslogin

In my experience it makes even more sense in functional programming languages, not less, since they usually also have more powerful type systems that help with actually representing parsed vs unparsed data.

DEL is unicode codepoint U+007F, which is the byte 0x7F in UTF-8, not 0xFF. Perhaps you were thinking of ÿ which is codepoint U+00FF, which encodes to the bytes 0xC3 0xBF in UTF-8.

I was thinking of DEL, but was obviously mistaken. Thanks for catching that!

Here's an equivalent shell script that only uses bash builtins, so no other software required:

  #!/bin/bash 
  mac="\\x${1//:/\\x}" 
  wol="\xFF\xFF\xFF\xFF\xFF\xFF" 
  for i in {1..16}; do wol+="$mac"; done 
  printf "$wol" > "/dev/udp/$2/9"


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: