#!/bin/sh if [ "_$1" != "_" ];then l="$1" else read l fi printf "$(echo "$l" | sed "s/%/\\\\x/g")"