author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 02 Feb 2010 00:43:10 +0200 | |
changeset 3 | 41300fa6a67c |
parent 0 | 1918ee327afb |
permissions | -rw-r--r-- |
#!/bin/sh LEN="$1" STR="$2" PAD='\0' STRLEN=`echo $STR | wc -c` RES="$STR" EXTRALEN=`expr $LEN - $STRLEN` while [ "$EXTRALEN" -gt 32 ]; do RES="$RES$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD" EXTRALEN=`expr $EXTRALEN - 32` done while [ "$EXTRALEN" -gt 0 ]; do RES="$RES$PAD" EXTRALEN=`expr $EXTRALEN - 1` done cat <<EOF $RES EOF