3

For large outputs bc utility in unix gives output in this format:

  $ bc bc 1.06.95 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.     
    2^1000
    10715086071862673209484250490600018105614048117055336074437503883703\ 
    51051124936122493198378815695858127594672917553146825187145285692314\ 
    04359845775746985748039345677748242309854210746050623711418779541821\ 
    53046474983581941267398767559165543946077062914571196477686542167660\    
    429831652624386837205668069376

Is it possible to add formatting options so that it give the output in just 1 line

arunmoezhi
  • 3,082
  • 6
  • 35
  • 54
  • My `bc` doesn't do that. What operation did you perform to get that output? And what version of `bc`? – lurker Sep 28 '13 at 00:08
  • `$ bc bc 1.06.95 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc. 2^1000 10715086071862673209484250490600018105614048117055336074437503883703\ 51051124936122493198378815695858127594672917553146825187145285692314\ 04359845775746985748039345677748242309854210746050623711418779541821\ 53046474983581941267398767559165543946077062914571196477686542167660\ 429831652624386837205668069376` – arunmoezhi Sep 28 '13 at 00:11
  • Ah those numbers are a lot longer than your example. Mine does that, too. – lurker Sep 28 '13 at 00:17
  • I will modify the question to reflect a valid case – arunmoezhi Sep 28 '13 at 00:18

1 Answers1

7

Try setting the BC_LINE_LENGTH environment variable as documented here.

Carl Groner
  • 4,149
  • 1
  • 19
  • 20