Handles input in UTF-8 or ISO-8859-1 or any charset that has ASCII as a subset. Limitation: it only handles //... comments, not the /*...*/ kind.
When my first attempt was foiled by sed's behaviour on a command such as s|\(...\)*...|\1| the sed solution got so ugly that any reasonable person would've switched to something else, but I didn't:-)
Here is the bash script jsminify.
Send bug-reports, comments, or suggestions to email@example.com.