use 3 arguments
{3}
fanout read <filename> <column_number>
=> output the column contents to the console
(this is a read-only operation)
{4}
fanout create_files <filename> <column_number>
fanout touch <filename> <column_number>
(these 2 commands are equivalent)
=> create a new subdirectory with the
same name as <filename>
(without the file extension)
=> in the new subdirectory,
create a single text file for each of
the values (lines) found in the specified column
=> long filenames will be truncated
(max file name length: 64 characters)
CAUTION: this is a read & write operation!
{5}
fanout create_dirs <filename> <column_number>
fanout create_directories <filename> <column_number>
fanout mkdir <filename> <column_number>
(these 3 commands are equivalent)
=> create a new subdirectory with the
same name as <filename>
(without the file extension)
=> in the new subdirectory,
create a single directory for each of
the values (lines) found in the specified column
=> long filenames will be truncated
(max file name length: 64 characters)
CAUTION: this is a read & write operation!
examples :: use 2 arguments (read-only operations)
Suppose we have a .csv file called example.csv, containing the following lines:
id,first,second,third
100,A,X,abc
200,B,Y,cde
300,C,Z,fgh
command:
fanout read example.csv
output:
id,first,second,third
100,A,X,abc
200,B,Y,cde
300,C,Z,fgh
command:
fanout stats example.csv
output:
file: /absolute_path/to/example.csv
lines: 4
length of shortest line: 11 chars
length of longest line: 21 chars