看板 Linux 關於我們 聯絡資訊
我想再shell script 中判斷某個ubuntu 套件是否存在 例如是 ssh 這套件, 請問應該要如何寫? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.204.0.32
rehon:apt-cache show 09/01 21:15
yshihyu:這樣怎麼用在判斷?? if [`apt-cache show xxx` != ""] 09/01 22:14
yshihyu:這樣好像也不行 09/01 22:14
rehon:if apt-cache show ssh > /dev/null ;then echo exist; fi 09/01 22:48
kdjf:dpkg -L ssh 09/02 01:08