1USWAP(1)                    General Commands Manual                   USWAP(1)
2
3
4

NAME

6       uswap - converts the endianness of a Fortran unformatted file
7

SYNOPSIS

9       uswap [ -x ] [ -csfde.....  ] [ -i infile ] [ -o outfile ]
10

DESCRIPTION

12       uswap  converts  the endianness of a file written with Fortran's unfor‐
13       matted write command. Thus a dump file written on a big endian  machine
14       can  be converted to be read on a little endian machine.  The input and
15       output files may be named, otherwise standard input and standard output
16       are read/written to.
17
18       By  default  the  records  are assumed to contain data of 4 bytes size,
19       such as the default integer, logical, complex and real types. The  size
20       of the records can be set on the command line,
21
22              -c     character data
23
24              -s     short data (eg: integer*2, logical*2)
25
26              -f     float data (eg: integer, real, logical, complex)
27
28              -d     double precision data (eg: integer*8, real*8, double pre‐
29                     cision, double complex).
30
31              -e     extended precision data  (eg:  real*16,  extended  preci‐
32                     sion).
33
34       The  following  examples  shows  how a data file containing a character
35       record, a double precision record, and a  number  of  single  precision
36       records can be converted;
37            uswap -cdf -i infile -o outfile
38
39       See  uread(1)  to  read  the number of records in a Fortran unformatted
40       data file, and to guess the record contents.
41
42       By default uswap will byte swap a file written on the host machine.  To
43       byte swap a file written on a foreign machine with opposite endianness,
44       use the -x flag.
45

NOTE

47       The error message
48            uswap: data larger than file length
49       often indicates that the file being read has the opposite byte "sex" to
50       the  platform  uread  is  being run on. Try using the -x flag to see if
51       this is the case.
52

SEE ALSO

54       uread(1), ustrip(1)
55

AUTHOR

57       S.E. Norris s.norris@auckland.ac.nz
58
59
60
61                                                                      USWAP(1)
Impressum