reorder(1)

NAME

reorder - swaps columns in a delimited flat file

SYNOPSIS

reorder  [-hVvdsmfF] [file(s)]

DESCRIPTION
swaps columns in a delimited flat file

-h  --help
    print this message and exit

-V  --version
    print version info and exit

-v  --verbose
    print verbose messages during execution

-d delim   --delim=delim
    specifies delimiting string

-s swap   --swap=swap
    specifies two fields to swap (ex: -s 1,3)

-m move   --move=move
    specifies a field to move to a new position (ex: -s 3,1)

-f fields   --fields=fields
    specifies fields to use to create a new string (ex: -f 3,4,1,5,2)

-F field_labels   --field-labels=field_labels
    a list of labels specifying the output field order

the fields param is exclusive of swap and move - if -f and -m or -s are specified, only -f will be used.

example: reorder -d : -s 1,3 -m 2,4 /etc/passwd

would swap fields 1 and 3, and then would move field 2 to position 4.

AUTHOR

Written by the maintainers and contributers of CRUSH tools.  See
    http://code.google.com/p/crush-tools

REPORTING BUGS

Report bugs to <crush-tools@googlegroups.com>, or visit
    http://groups.google.com/group/crush-tools

COPYRIGHT
   Copyright 2008 Google Inc.
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
       http://www.apache.org/licenses/LICENSE-2.0
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.