bc LF/CR near the 68th char?

Evuraan::ഏവൂരാന്‍ evuraan at gmail.com
Fri Mar 13 19:48:16 UTC 2009


Hi all,

bc folds (LF/CR) right after the 68th char or so, when working with
large numbers.  is there a way to avoid the folding from within bc? (I
know I can use c=$(echo $a |bc -l) ; echo $c |sed 's/\\ //g' as a work
around) - but if this could be done from within bc, that wud be
nice..!


$:>  a=0; for i in `seq 1 1000`; do  a="$a+$i^$i"; done
$:> echo $a |bc -l
10003681991446951770953750112276467955677936806229346545837609881002\
34910747716194381428659099527845945869942643191290894720342979906407\
67964725986043423846803832604080969103761537037623771364851006311573\
29514617742467055842668657596018158436664428322845568803131145481515\
39190975398485496645576513465858582712336401166221956188173449531674\
10268890832176466302030669977040862534076609159502279137936809836930\
63756028138566463587737515587752134602257965798465833340073493586243\
42339332981334571237888809283103348760261360175950815609179464026871\
00524365210998086355214201424290343406856093657323107934219403186441\
39181012381510565092673935157603928424725013915940734630015218438110\
73767021711026307504695733467897821866906648469828346607412967395801\
79779168360983472243224195284535256468186824036956956619282555532355\
80780619975276899838488633747867893315815652520591726143394246009861\
43259233167583371070362625554531852054166117148858229508581589614337\
59446327755438051838092130121883632710223140733220110974010258021646\
92983317669206196460837907328076273606144280851715650062897285086889\
64226799647192582924058589530750674578385365561878559589685756225692\
34891474692281091391561983475411764835803581412867029415856566994208\
77362863909422415472260150044713306301130720427042889050421426281937\
71918594574302202147201188486345913190833752307476966010547423928871\
06311878302603638131903905200825207205793366671291894623331279369709\
40742241878720459709764443092427821877383202574900808243300749916986\
98239561125811127607863900355221737846690567707344074494145266662103\
83981284021630344847691395707235573271662709837224522304679291974725\
91131574258240648583314154009432782130429546350535740452099845122212\
64241903550178416824551412548637590007779082539288247751653566899882\
74959440589510258798553952770949351004954644542726561747839910718823\
86817712159042341193922474897510790859480559450988056179637229284695\
54263782217625160428008228845552540344494860195267115187092227766195\
75390721112664615014061474423397476527347561996431185285861416781966\
83401247304877101620067935299857588206536772743795633134954545266327\
18723482339494825759821076401694316043456512117937935456463521463021\
19772669498355892913235757618859497751663073421286386945616420552553\
67673112981371825114946494636630737592192130568235616677760937394257\
42883930712609962163464088038826569132032160692637206183085942987973\
68458427649178484311547207790040169259569411927355351102599126544603\
93662889217435813332000837171052411715046068835434188620240475521770\
55263424469501298905901938158245938633694105024815166679813689156668\
34119771347509438990488712679446890189385047505001120522574245555562\
57505602132303879103379839503332450206532389891155070138829562777638\
80795687210857196493893142656713105966275422144605988058939600603604\
22692140140209651929425048867029798339635327946045314237554226788198\
91974817897806789550937631936586036908984748269769065444739780174557\
20367929981796023041785852626797271283465789498383642350667978127819\
110846700

Many thanks in advance.!




More information about the ubuntu-users mailing list