coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Monday September 6, 2010


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?
Create an account

Who's Online
We have 63 guests online

Newest Member

Starmamex

Hit Counter
4760779 Visitors

cool Statistics
coolcommands:1313
Categories:82
Total queries:523831
Members:4281





Search coolcommands.com
Search Keyword:


coolcommand

fold - how to create line breaks at maximum characters or bytes
Description

To create line breaks on a line in a file using either the number of characters or bytes:

# fold [-bs] [ -w width| -width] [file]

where:

-b : count width in bytes rather than column positions.

-s : if a segment of a line contains a blank character within the first width column positions (or bytes), break the line after the last such blank character meeting the width constraints. If there is no blank character meeting the requirements, the -s option will have no effect for that output segment of the input line.

-w width|-width : specify the maximum line length, in column positions (or bytes if -b is specified). If width is not a positive decimal number, an error is returned. The default value is 80.

Example to put a line break after 80 characters on a line have been reached:

# fold -w 80 myfile

Example to put a line break after 100 bytes on a line have been reached:

# fold -b 100 myfile

Description: Fold utily will break the lines to have maximam char (-w option) or bytes (-b option).
Example

fold -w 80 myfile

Return to search results

Random coolcommands

coolcommand: how to add a default route
Example: route add default 172.26.13.1 0
[show me the details]
coolcommand: poweroff - how to shutdown the processor and remove power in Solaris
Example: poweroff
[show me the details]
coolcommand: how to find the file where all the filesystem descriptions are in IBM AIX
Example: /etc/filesystems
[show me the details]
coolcommand: change a server hostname with uname command in IBM AIX
Example: uname -S new_hostname
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1138
audet37
kah00na32
Mariom24
lebjf00013

Top 5 Searches

Category Solaris42690
Category AIX38082
Category General UNIX34254
solaris20802
aix19388

Terms of Use
Privacy
Contact


 
coolcommands.com © 2010. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum