Hello,
I have file which needs to be splitted into multiple line with each line holding 80 bytes.
Im using the fmt command as
fmt -w 80 {filename} > {out filename}
but getting the error
fmt: Too many characters in a word.
Thanks
Hello,
I have file which needs to be splitted into multiple line with each line holding 80 bytes.
Im using the fmt command as
fmt -w 80 {filename} > {out filename}
but getting the error
fmt: Too many characters in a word.
Thanks
As the message says it seems there is a word that has more than 80 characters. Looking at its man page, fmt is for formatting a paragraph so that words in it are arranged to some width for example. It does not cut words/strings appart.
I have currently no easy solution in mind but I guess someone will come up with one soon, sorry.
what language then words longer then 80 characters?
may be eny adress as www.unix.com/aa/aaa/aaa/aaa/aaa/aaaa/aaaa/aaa/aaaa/aaaa/aaa is in you text?
what do with it?
Why you say "bytes" not "80 characters"? lenght of you character code is 8 bit?
Sorry, I need 80 characters in a line, irrespective of the word length so that i want to bring the 81 character to the next line.
Is there any command other than fmt, or is there any options in fmt to achieve this.
Thanks,
Bharath.S
try:
fold <input_file >output_file
Great! it worked thanks for the suggestion.
Cheers...
Simlar to a question yesterday.
http://www.unix.com/shell-programming-scripting/142160-how-organise-file.html
fold -w 80 {filename} > {out filename}