Linux Commands: Wrap text to fit a specified width


fold-Linux Command

fold

Wrap input lines to fit in specified width, writes each FILE (`-' means standard input), or standard input if none are given, to standard output, breaking long lines.

SYNTAX
      fold [options]... [FILE]...

By default, `fold' breaks lines wider than 80 columns. The output is split into as many lines as necessary.

`fold' counts screen columns by default; thus, a tab may count more than one column, backspace decreases the column count, and carriage return sets the column to zero.

OPTIONS

`-b'
`--bytes'
	Count bytes rather than columns, so that tabs, backspaces, and
	carriage returns are each counted as taking up one column, just
	like other characters.

`-s'
`--spaces'
	Break at word boundaries: the line is broken after the last blank
	before the maximum line length.  If the line contains no such
	blanks, the line is broken at the maximum line length as usual.

`-w WIDTH'
`--width=WIDTH'
	Use a maximum line length of WIDTH columns instead of 80.

Related Linux Bash commands:

csplit - Split a file into context-determined pieces
cut - Divide a file into several parts
expand - Convert tabs to spaces
fmt - Reformat paragraph text
head - Output the first part of file(s)
paste - Merge lines of files
split - Split a file into fixed-size pieces
tail - Output the last part of files


Other Linux Commands:
alias , break , builtin , cal , case , cat , cd , cfdisk , chgrp , chmod , chown , chroot , cksum , cmp , comm , command , continue , cp , cron , crontab , csplit , cut , date , dc , dd , declare , df , diff , diff3 , dir , dircolors , dirname , dirs , du , echo , egrep , enable , env , eval , exec , expand , export , expr , factor , false , fdformat , fdisk , fgrep , find , fmt , fold , for , fsck , function , getopts , hash , hashcharacter , head , history , hostname , id , if , import , install , join , kill , less , let , ln , local , locate , logname , logout , lpc , lpr , lprm , ls , m4 , man , mbadblocks , mkdir , mkfifo , mknod , more , mount , mtools , mv , nice , nl , nohup , passwd , paste , period , popd , pr , printf , ps , pushd , pwd , quota , quotacheck , quotactl , ram , rcp , read , readonly , return , rm , rmdir , rsync , sdiff , sed , select , seq , set , shift , shopt , shutdown , sleep , sort , split , su , sum , symlink , sync , tac , tail , tar , tee , test , time , times , top , touch , tr , traceroute , true , tsort , tty , type , ulimit , umask , uname , unexpand , uniq , units , unset , unshar , until , useradd , usermod , users , uuencode , watch , wc , whereis , which , while , who , xargs , yes ,
Live2Support.com :
Product - Benefits - Features - How Does it Works - Pricing - SSL Certificates - Signup - Contactus - Login - Submit Resources