Ошибка с командой переименования

weboobтакже может это сделать:

Weboob is a collection of applications able to interact with websites, without requiring the user to open them in a browser. It also provides well-defined APIs to talk to websites lacking one.

Я обнаружил, что Ubuntu 16.04.3 ltsимеет старую версию weboob. лучше клонировать прямо изgit:

$ git clone https://git.weboob.org/weboob/devel.git weboob && cd weboob

Запустить модуль translaboobвручную:

$./tools/local_run.sh  translaboob

При первом запуске вам нужно будет выбрать серверную часть, которую вы хотите использовать:

Warning: there is currently no configured backend for translaboob
Do you want to configure backends? (Y/n): Y

Available modules:
1) [ ] ebonics           English to Ebonics translation service
2) [ ] googletranslate   Google translation web service
3) [ ] larousse          larousse dictionary translations
4) [ ] wordreference     Free online translator
a) --all--               install all backends
q) --stop--

В этом примере мы выбираемgoogletranslate:

Select a backend to create (q to stop): 2
Backend "googletranslate" successfully added.

Available modules:
1) [ ] ebonics           English to Ebonics translation service
2) [X] googletranslate   Google translation web service
3) [ ] larousse          larousse dictionary translations
4) [ ] wordreference     Free online translator
a) --all--               install all backends
q) --stop--

После нажатия qвы можете ввести предложение для перевода, например:

Select a backend to create (q to stop): q
Right right!
Welcome to translaboob v1.4

Copyright(C) 2012-2018 Lucien Loiseau
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Type "help" to display available commands.

Loaded backends: googletranslate

translaboob> translate en de 'The quick brown fox jumps over the lazy dog'
* googletranslate
        Der schnelle braune Fuchs springt über den faulen Hund
translaboob> translate en ko 'The quick brown fox jumps over the lazy dog'
* googletranslate
        빠른 갈색 여우는 게으른 개를 뛰어 넘습니다.

2
22.11.2019, 17:08
1 ответ

rename делает не то, что вы думаете.

Вы можете сделать одно из следующего:

mv./-data-02-03-04.dat data020304.dat
mv -- -data-02-03-04.dat data020304.dat

Если вы действительно хотите использовать переименование, правильный синтаксис будет:

rename 's/-//g'./-data-02-03-04.dat
rename 's/-//g' -- -data-02-03-04.dat
0
27.01.2020, 21:55

Теги

Похожие вопросы