Quote:
Originally Posted by widebody911
cat file | sed -e s/^0*//g > file.new
|
you could use the -i arg to sed and not have to cat it or redirect to a new file
sed -i s/^0*//g filename
Or you could use expr and add the numbers to 0, which will drop all insignificant digits
for i in `cat file`
do
expr $i + 0 >> newfile
done
Although thats kinda sloppy... but depending on how the file is structured, may be required.