Most of the times while viewing big log files in vi editor, you would get "Line too Long" error. A simple solution to this problem is to use the fold command:
fold -80 yourfile.log > folded.log
Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps
Wednesday, May 26, 2010
Subscribe to:
Post Comments (Atom)
4 comments:
:) I did not know the fold command...
Note that if vi (THE vi) does not support lines longer than 4000, some clones do support more
perl -e 'print "x" x 1000000 . "\n"' | tee long;vim long
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"long" 1 line, 1000001 characters
a 1 million character line :)
hi.
typing "stty columns 130" (before invoking vi) will solve this issue.
Cheers
typing "stty columns 130" (before invoking vi) will solve this issue.
No, it won't!
I am really thankfull to you for posting this, i searched whole 5 hours for this simple solution and i couldnt find anywhere. this was really help full.
Keep posting
Thanks,
Prem
Post a Comment