author | Eckhart Koeppen <eckhart.koppen@nokia.com> |
Thu, 29 Apr 2010 15:15:16 +0300 | |
branch | RCL_3 |
changeset 16 | 4b6ee5efea19 |
parent 0 | 1918ee327afb |
permissions | -rwxr-xr-x |
#!/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