Hi All
I am trying to reformat a flat file but im facing a issue
let me explain myself
Orignal File:
010800650022000003190000000+000002ECLPSE BIG E SPEAR000022505 ^M
010800650034000003470000000+000006YORK MINT TIN 000012405 ^M
010800650012546310530000000+000003DENTYNE ICE GUM 000022005 ^M
010800650012546310510000000+000001DENTYNE ICE GUM 000022005 ^M
010800650034000003470000000+000006YORK MINT TIN 000012405 ^M
but when i run a reformat script im losing all the spaces, which i need;
script is as following:
cat file | while read line
do
echo "20084\c" >> newFile.dat
echo $line >> newFile.dat
done
20084010800650022000003190000000+000002ECLPSE BIG E SPEAR000022505 ^M
20084010800650034000003470000000+000006YORK MINT TIN 000012405 ^M
20084010800650012546310530000000+000003DENTYNE ICE GUM 000022005 ^M
20084010800650012546310510000000+000001DENTYNE ICE GUM 000022005 ^M
20084010800650034000003470000000+000006YORK MINT TIN 000012405 ^M
I have tried it with print as well but no luck so far.
I would like to keep the format as the original file.
Thanks for your help in advance
Laters
I am trying to reformat a flat file but im facing a issue
let me explain myself
Orignal File:
010800650022000003190000000+000002ECLPSE BIG E SPEAR000022505 ^M
010800650034000003470000000+000006YORK MINT TIN 000012405 ^M
010800650012546310530000000+000003DENTYNE ICE GUM 000022005 ^M
010800650012546310510000000+000001DENTYNE ICE GUM 000022005 ^M
010800650034000003470000000+000006YORK MINT TIN 000012405 ^M
but when i run a reformat script im losing all the spaces, which i need;
script is as following:
cat file | while read line
do
echo "20084\c" >> newFile.dat
echo $line >> newFile.dat
done
20084010800650022000003190000000+000002ECLPSE BIG E SPEAR000022505 ^M
20084010800650034000003470000000+000006YORK MINT TIN 000012405 ^M
20084010800650012546310530000000+000003DENTYNE ICE GUM 000022005 ^M
20084010800650012546310510000000+000001DENTYNE ICE GUM 000022005 ^M
20084010800650034000003470000000+000006YORK MINT TIN 000012405 ^M
I have tried it with print as well but no luck so far.
I would like to keep the format as the original file.
Thanks for your help in advance
Laters