man uakce
NAME
uakce - Simple (very) file column editor
SYNOPSIS
uakce
-ACTION [input-file]
[-output filename] [-verbose] [-quiet] [-trail]
DESCRIPTION
The uakce command is a very simple file editor based primarily on column
positions. Exactly one action can be provided, but results can be piped
into another uakce command. If an input-file is not specified then stdin is
assumed.
ACTIONS (exactly one can be specified)
-keep left,right
Keep only specified columns.
-remove left,right
Remove specified columns.
-add after,string
Add string after specified column.
-edit left,right,string
Replace specified columns with string.
-copy left,right,after
Copy columns to new location.
-move left,right,after
Move columns to new location.
-duplicate left,right
Duplicate specified columns.
-newline after-nth
Insert newline after everth nth line.
-join after-nth
Remove newline after every nth line.
-backspace
Remove ctrl/h and preceeding character.
-upper
Uppercase anything outside ' or ".
-lower
Lowercase anything outside ' or ".
-tabs
Expands tabs to spaces.
Uses defaults unless -stops specified.
-stops [char][,value[...]]
Specify tab character (default is ascii tab).
Specify tab stops, default stops are:
9,17,25,33,41,49,57,65,73,81,89,97,105,113,121,129.
OPTIONS
-output filename
To specify output file, defaults to stdout.
-verbose
Verbose option to display settings.
-quiet
Do not query for missing values.
-trail
Do not strip off trailing white space.
Must be fully spelled out.
-? Display terse help message.
EXAMPLES
Insert a tab before every line:
snkac@java: uaio -m2 # before
971101.165405 Sleep:1 Iterations:0
Total rz0 rz1 cpu
kbs tps kbs tps kbs tps us ni sy wa id
25 2 . . . . 5 1 9 0 86
snkac@java: uaio -m2 | uakce -a0,' '
971101.165420 Sleep:1 Iterations:0
Total rz0 rz1 cpu
kbs tps kbs tps kbs tps us ni sy wa id
25 2 . . . . 5 1 9 0 86
Removing columns:
snkac@java: vmstat 1 5 | uakce -r22,68
Virtual Memory Statis
procs memory cpu
r w u act free us sy id
5291 16 12K 1074 5 9 86
3293 16 12K 962 3 39 57
4292 16 12K 962 7 22 71
3293 16 12K 962 3 21 76
3293 16 12K 962 3 21 76
NOTES
uakce has been tested under IBM/MVS, VAX/VMS, Digital UNIX, IRIX, and
UNICOS. Suggestions for enhancements or bug reports can be directed to
dutools@ts.sois.alaska.edu.
This command utilizes the cci command parser utilized by non-UNIX operating
systems instead of the traditional UNIX getopt() parsing. Actions and
options have been defined to "look like" UNIX style options, but can be
spelled out or generally abbreviated. For example '-o' is the same as '-
output'. Because of this multiple options must be space separated and the
hyphen is part of the option name. Also because of this order of options
and arguments is irrelevant.
ACKNOWLEDGEMENTS
Written at the University of Alaska.
RELATED INFORMATION
Commands: awk(1), sed(1), ed(1).