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

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

fromcsv(USP)

Name

fromcsv : CSV Filter

Synopsis

Usage   : fromcsv <file>

Option  : -n <null_string>

          -z <zero_string>

          -s <space_character>

          -e

          -q

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

Edition : 3

Description

Converts a CSV file to a space-delimited file.

If the file name is not specified or is "-" then this

command expects input on standard input.

Specifications

1. Data that is recognized as comma-delimited includes

   string 0 (not enclosed in double-quotes) and "string 1"

   (enclosed in double quotes).

2. Empby string 0 is converted to 0, empty-string 1 is

   converted to "_".

   (-z option changes 0 in string0,

    -n option changes _ in string 1)

3. Escaped double quotes inside string 1 are converted to single ".

   You cannot use double quotes in string 0.

4. Half-width spaces inside any string are converted to "_"

   (-s option changes _)

5. -e option precedes "_" (or the charcter specfied by -s option) and

   "\" by "\".

6. -q option eliminate preceding "\" form "\"" and "\\".

7. \r\n at the end of a line is automatically converted to \n.

8. Any \n inside string 1 is converted to "\n".

9. The final line does not require a linefeed (\n).

Example 1

$ cat data

,"",3,"a_b","cde

f\gh","i j","k,""l"

$ fromcsv data

0 _ 3 a_b cde\nf\gh i_j k,"l

$ fromcsv -e data

0 _ 3 a\_b cde\nf\\gh i_j k,"l

Note

RFC (in Japanese)

http://www.kasai.fm/wiki/rfc4180jp