home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: nawk Chapter 2
UNIX Commands
Next: Reference: newgrp
 

newform



newform

 [

options

] 

files

Format files according to the options specified. newform resembles cut and paste and can be used to filter text output. Options can appear more than once and can be interspersed between files (except for -s , which must appear first).

Options

-a[ n ]

Append n characters to the end of each line or, if n isn't specified, append characters until each line has the length specified by -l .

-b[ n ]

Delete n characters from beginning of each line or, if n isn't specified, delete characters until each line has the length specified by -l .

-c m

Use character m (instead of a space) when padding lines with -a or -p ;

-e[ n ]

Same as -b but delete from the end. -c must precede -a or -p .

-f

Display tabspec format used by last -o option.

-i' tabspec '

Expand tabs to spaces using tabspec conversion (default is 8 spaces); tabspec is one of the options listed under tabs .

-l[ n ]

Use line length n (default is 72). If -l is not specified, default line length is 80. -l usually precedes other options that modify line length ( -b , -e , -c , -a , or -p ).

-o' tabspec '

Turn spaces into tabs using tabspec conversion.

-p[ n ]

Same as -a but pad beginning of line.

-s

Strip leading characters from each line (up to and including first tab); the first seven characters are moved to the end of the line (without the tab). All lines must contain at least one tab.

Example

Remove sequence numbers from a COBOL program:



newform -l1 -b7 



file


Previous: Reference: nawk UNIX in a Nutshell: System V Edition Next: Reference: newgrp
Reference: nawk Book Index Reference: newgrp

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System










??????????????@Mail.ru