Как я заставляю UUENCODE работать?

Я обычно использую простую функцию:

Confirm() { read -sn 1 -p "$* [Y/N]? "; [[ ${REPLY:0:1} = [Yy] ]]; }

Функция просто возвращается 0 если Y или y вводится и 1 если что-либо еще вводится. Это может использоваться с if...fi:

if Confirm "Type y or n"; then
echo "You typed y"
else
echo "You typed n"
fi

Или точно так же, как это:

Confirm "Type y" && echo "You typed y"
7
08.07.2011, 16:33
2 ответа

Вы попытались использовать yum к доступу репозитории RHEL и установка версия sharutils, который соответствует Вашему выпуску?

$ yum update
$ yum install sharutils

Пакеты CentOS являются обычно непосредственными эквивалентами пакетам RHEL с удаленным брендингом. Вы могли попытаться вручную загрузить пакет от них. Похоже, что Вы могли получить тот пакет здесь:

$ wget http://mirror.rackspace.com/CentOS/4/apt/i386/RPMS.os/sharutils-4.2.1-22.2.i386.rpm
9
27.01.2020, 20:16
  • 1
    Спасибо. Тот пакет, кажется, решает проблему (ожидающий тестирование конечных пользователей). Это не позволит мне upvote ответ по некоторым причинам, таким образом, я захочу сказать спасибо! –  user739866 08.07.2011, 16:45

Как получить Uuencode на Fedora 17 Linux

Узнайте то, что предусматривает Uuencode с помощью конфетки:

yum provides uuencode

Считайте то, что конфетка говорит Вам:

sharutils-4.11.1-3.fc17.x86_64 : The GNU shar utilities for packaging 
                                 and unpackaging shell archives
Repo        : @updates
Matched from:
Filename    : /usr/bin/uuencode

О, Взгляд! 'sharutils' предоставляет Uuencode

Установите это:

yum install sharutils

Вы получаете этот вывод:

[root@defiant el]# yum install sharutils 
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: ftp.usf.edu
 * rpmfusion-free: mirror.hiwaay.net
 * rpmfusion-free-updates: mirror.hiwaay.net
 * rpmfusion-nonfree: mirror.hiwaay.net
 * rpmfusion-nonfree-updates: mirror.hiwaay.net
 * updates: mirror.hiwaay.net
Resolving Dependencies
--> Running transaction check
---> Package sharutils.x86_64 0:4.11.1-3.fc17 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================================================================================
 Package                                                Arch                                                Version                                                      Repository                                            Size
====================================================================================================================================================================================================================================
Installing:
 sharutils                                              x86_64                                              4.11.1-3.fc17                                                updates                                              176 k

Transaction Summary
====================================================================================================================================================================================================================================
Install  1 Package

Total download size: 176 k
Installed size: 612 k
Is this ok [y/N]: y
Downloading Packages:
sharutils-4.11.1-3.fc17.x86_64.rpm                                                                                                                                                                           | 176 kB     00:00     
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : sharutils-4.11.1-3.fc17.x86_64                                                                                                                                                                                   1/1 
  Verifying  : sharutils-4.11.1-3.fc17.x86_64                                                                                                                                                                                   1/1 

Installed:
  sharutils.x86_64 0:4.11.1-3.fc17                                                                                                                                                                                                  

Complete!

Затем тест, чтобы видеть, работает ли это

[root@defiant el]# which uuencode
/usr/bin/uuencode
[root@defiant el]# uuencode --version
uuencode (GNU sharutils) 4.11.1
6
27.01.2020, 20:16

Теги

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