Можно ли исправить Ubuntu 16.04, установив Ubuntu 16.04 поверх существующего Ubuntu 16.04?

В версии GNU sed вы можете использовать команду r (чтение) для чтения и вставки содержимого файла непосредственно на заданный адрес строки

r filename
    As a GNU extension, this command accepts two addresses.

    Queue the contents of filename to be read and inserted into the output stream
    at the end of the current cycle, or when the next input line is read. Note that
    if filename cannot be read, it is treated as if it were an empty file, without
    any error indication.

    As a GNU sed extension, the special value /dev/stdin is supported for the file
    name, which reads the contents of the standard input.

Например

$ sed '1r content.txt' example.txt
REAL_FIRST_LINE
first_line
second_line
REAL_SECOND_LINE
1
задан 3 September 2016 в 01:42

0 ответов

Другие вопросы по тегам:

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