All in one sed:
Code:
sed 's/^0*\(.\{9\}\).*/\1/g'
Your example works:
Code:
000000001200820060734
^^^^^^^^^
## If number of didigts in front changes, ie. if the last leading zero is not a prefix:
000000000200820060734
^^^^^^^^^
So this can go wrong and you might want to use the following, based on a fix number/position of digits:
Code:
echo "000000001200820060734"| cut -c8-17
Last edited by zaxxon; 06-30-2008 at 05:31 AM..
|