Попробуйте это,
sed -i "$ s/$/ $(head -1 file1)/" file2
testing 123
$
отредактируйте последнюю строку файла. s/$
Замените EOL на $(head -1 file1)
, что является первой строкой файла1. Каков ваш результат, когда вы теперь запускаете sudo update-alternatives --config x-terminal-emulator
?
Мой:
There are 2 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/konsole 40 auto mode
1 /usr/bin/gnome-terminal.wrapper 40 manual mode
* 2 /usr/bin/konsole 40 manual mode
Press <enter> to keep the current choice[*], or type selection number: