У меня был тэг <input type="button">
, скрытый от просмотра. Я сделал прикрепление события "onClick"
к любому видимому компоненту любого типа, такого как метка. Это было сделано с использованием либо инструментов разработчика Google Chrome, либо Firebug Mozilla Firefox, используя команду «edit HTML» правой кнопкой мыши. В этом случае укажите следующий скрипт или что-то подобное:
Если у вас есть JQuery:
$('#id_of_component').click();
, если нет:
document.getElementById('id_of_component').click();
Спасибо.
Вы смотрели на команду разделения?
$ split --help
Usage: split [OPTION] [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT
is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-a, --suffix-length=N use suffixes of length N (default 2)
-b, --bytes=SIZE put SIZE bytes per output file
-C, --line-bytes=SIZE put at most SIZE bytes of lines per output file
-d, --numeric-suffixes use numeric suffixes instead of alphabetic
-l, --lines=NUMBER put NUMBER lines per output file
--verbose print a diagnostic to standard error just
before each output file is opened
--help display this help and exit
--version output version information and exit
Вы могли бы сделать что-то вроде этого:
split -l 200000 filename
, который создаст файлы, каждый из которых содержит 200000 строк с именем xaa xab xac
. ..
Другой вариант, разделение по размеру выходного файла (по-прежнему разбивается на разрывы строк):
split -C 20m --numeric-suffixes input_filename output_prefix
создает файлы типа output_prefix01 output_prefix02 output_prefix03 ...
каждый размером не более 20 мегабайт.
Вы также можете использовать awk
awk -vc=1 'NR%200000==0{++c}{print $0 > c".txt"}' largefile
Как насчет команды split ?
split -l 200000 mybigfile.txt
Да, есть команда split
. Она разделит файл на строки или байты.
$ split --help
Usage: split [OPTION]... [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
size is 1000 lines, and default PREFIX is `x'. With no INPUT, or when INPUT
is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-a, --suffix-length=N use suffixes of length N (default 2)
-b, --bytes=SIZE put SIZE bytes per output file
-C, --line-bytes=SIZE put at most SIZE bytes of lines per output file
-d, --numeric-suffixes use numeric suffixes instead of alphabetic
-l, --lines=NUMBER put NUMBER lines per output file
--verbose print a diagnostic just before each
output file is opened
--help display this help and exit
--version output version information and exit
SIZE may have a multiplier suffix:
b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.
использовать split
Разбивать файл на части фиксированного размера, создавать файлы вывода, содержащие последовательные разделы INPUT (стандартный ввод, если ничего не задано или INPUT равен «-»)
Синтаксис
разделить [параметры] [ВВОД [ПРЕФИКС]]