uspTukubaiコマンドに関する様々な資料がここにあります。

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

mime-read (USP)

Name

mime-read : Read contents from a multipart MIME formatted file

Synopsis

Usage   : mime-read [options] <name> <MIME-file>

          mime-read [options] --any <MIME-file>

          mime-read -v <MIME-file>

Options : --output <output-file>

          -<n>

          -n<str>

          -s<char>

          --filename

Version : Tue Jan  9 09:02:34 JST 2024

Edition : 1

Description

Mime-read command extracts the data of the specified part form the

multipart MIME file <MIME-file>.  If <MIME-file> is omitted or "-"

is specified for <MIME-file>, the standard input is read.

If <name> is specified, the parts which includes name="<name>" operand

in the part header is object for extraction.  If --any is specified,

all parts are object for extraction.

If --output <output-file> option is specified, all object parts are

output to the file named "output-file.seq" where seq is sequence

number. If <name> is specified, the data of parts which includes

name="<name>" operand in the part header are written to the output

files.  If --any is specified, the data of all parts are written to

the output files.  If --output <output-file> option is not specified,

the first part of object parts is written to the standard output.

If -<n> option is specified, the data of the n-th part is output.

If <name> is specified, the n-th part which includes name="<name>"

operand in the part header is output.  If --any is specified, the

n-th part is output.

If -n<str> option is specified, <str> is outout when the data is

empty.

if -s<char> option is specified, space characters in the data are

replaced by <char>.

If --filename option is specified, the operand filename="path" is

searched in the part header and the basename of "path" are output

instead of tha data.

If -v option is specified, all part headers are printed preceaded by

part number.

Example 1

Extracts the first part with name="abc.txt" from file "mime-file".

$ cat mime-file

MIME-Version: 1.0

Content-Type: multipart/mixed; boundary="0000000000007d70f705795b80bb"

--0000000000007d70f705795b80bb

Content-Type: text/plain; charset="US-ASCII"

Content-Transfer-Encoding: 7bit

Visual computing is experiencing a tsunami-sized sea change. Want

(omitted)

specific system components that can cause performance bottlenecks.

--0000000000007d70f705795b80bb

Content-Type: text/plain; charset="ISO-2022-JP"; name="abc.txt"

Content-Disposition: attachment; filename="C:\Users\Desktop\USERMASTER"

Content-Transfer-Encoding: quoted-printable

=1B$B$3$s$K$A$O!"=1B(BPeX=1B$B$G$9!#=1B(B

(omitted)

=1B$B(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,=1B(B

--0000000000007d70f705795b80bb

Content-Type: text/plain; charset="UTF-8"; name="abc.txt"

Content-Transfer-Encoding: base64

LS1vdXRwdXQgPG91dHB1dC1maWxlPiDjgpLmjIflrprjgZfjgZ/loLTlkIjjgIFuYW1lPSI8bmFt

(omitted)

MuWHuuOBmeOAgg==

--0000000000007d70f705795b80bb--

$ mime-read abc.txt mime-file

=1B$B$3$s$K$A$O!"=1B(BPeX=1B$B$G$9!#=1B(B

(omitted)

=1B$B(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,=1B(B

Example 2

Extracts the first part from file "mime-file".

$ mime-read --any mime-file

Visual computing is experiencing a tsunami-sized sea change. Want

(omitted)

specific system components that can cause performance bottlenecks.

Example 3

Extracts all parts with name="abc.txt" from file "mime-file".

$ cat ofile.1

=1B$B$3$s$K$A$O!"=1B(BPeX=1B$B$G$9!#=1B(B

(omitted)

=1B$B(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,=1B(B

$ cat ofile.2

LS1vdXRwdXQgPG91dHB1dC1maWxlPiDjgpLmjIflrprjgZfjgZ/loLTlkIjjgIFuYW1lPSI8bmFt

(omitted)

MuWHuuOBmeOAgg==

Example 4

Extracts all parts from file "mime-file".

$ mime-read --output ofile abc.txt mime-file

$ cat ofile.1

Visual computing is experiencing a tsunami-sized sea change. Want

(omitted)

specific system components that can cause performance bottlenecks.

$ cat ofile.2

=1B$B$3$s$K$A$O!"=1B(BPeX=1B$B$G$9!#=1B(B

(omitted)

=1B$B(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,(,=1B(B

$ cat ofile.3

LS1vdXRwdXQgPG91dHB1dC1maWxlPiDjgpLmjIflrprjgZfjgZ/loLTlkIjjgIFuYW1lPSI8bmFt

(omitted)

MuWHuuOBmeOAgg==

Example 5

Extracts the file name of the part with name="abc.txt" from file

"mime-file".

$ mime-read --filename abc.txt mime-file

USERMASTER

Example 6

Print all part headers of from mime-file.

The first field is the part number for each part.

$ mime-read -v mime-file

1 Content-Type: text/plain; charset="US-ASCII"

1 Content-Transfer-Encoding: 7bit

2 Content-Type: text/plain; charset="ISO-2022-JP"; name="abc.txt"

2 Content-Disposition: attachment; filename="C:\Users\Desktop\USERMASTER"

2 Content-Transfer-Encoding: quoted-printable

3 Content-Type: text/plain; charset="UTF-8"; name="abc.txt"

3 Content-Transfer-Encoding: base64