[Bash] fold command
Sometimes it's handy to break long lines into shorter lines.
# read moby-dick file for first 250 lines
# then fold each line to have max 30 char (-w)
# -s make sure we don't break words
head -250 moby-dick.txt | fold -sw 30
Sometimes it's handy to break long lines into shorter lines.
# read moby-dick file for first 250 lines
# then fold each line to have max 30 char (-w)
# -s make sure we don't break words
head -250 moby-dick.txt | fold -sw 30