Для запуска выполните команду
$ node tool <action> <shift> <input> <output>
Аргументы:
- action: -a (или --action) encode (или decode) - для кодирования/декодирования соответственно; обязательный параметр
- shift: -s (или --shift) n - шаг смещения, где n целое число; обязательный параметр
- input: -i (или --input) "путь_файла/имя_входного_файла.txt" - файл для чтения данных; опционально, если не указано - ожидает ввод с клавиатуры
- output: -o (или --output) "путь_файла/имя_выходного_файла.txt" - файл для вывода данных; опционально, если не указано - выводит на экран
$ node tool -a encode -s 3 -i "./input.txt" -o "./output.txt"
$ node tool --action encode --shift 3 --input input.txt --output output.txt