On Saturday 26 November 2005 20:16, John Smith wrote: > Hi All, > > does somebody know why I keep losing the first character of the > third resulting string? > > Sincerely,
Two ways in which it works: 1) $ cat t4.sh #!/bin/sh export INPUT='$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.' echo "1 ==="$INPUT"===" export MD5PW=$(echo -n "$INPUT" | hexdump -v -e '" " 1/1 "%02d"') echo "2 ==="${MD5PW}"===" echo -n "3 ===" echo ${MD5PW} | tr ' ' '\n' | while read i; do echo $i | awk '{ printf("%c", $i) }'; done echo "===" $ ./t4.sh 1 ===$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.=== 2 === 36 49 36 105 87 57 53 122 47 72 66 36 71 70 99 89 70 120 77 75 75 54 120 56 69 85 80 103 108 86 107 117 120 46=== 3 ===$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.=== $ 2) $ cat t4-2.sh #!/bin/sh export INPUT='$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.' echo "1 ==="$INPUT"===" export MD5PW=$(echo -n "$INPUT" | hexdump -v -e '" " 1/1 "%02d"') echo "2 ==="${MD5PW}"===" echo -n "3 ===" for i in ${MD5PW}; do echo $i | awk '{ printf("%c", $i) }'; done echo "===" $ ./t4-2.sh 1 ===$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.=== 2 === 36 49 36 105 87 57 53 122 47 72 66 36 71 70 99 89 70 120 77 75 75 54 120 56 69 85 80 103 108 86 107 117 120 46=== 3 ===$1$iW95z/HB$GFcYFxMKK6x8EUPglVkux.=== $ alfredo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]