ver вроде работает, копирует название пакета и версию

This commit is contained in:
Slava 2024-11-22 15:08:21 +03:00
parent 389d9ec6a6
commit 52ea3129db
1 changed files with 3 additions and 2 deletions

5
ver
View File

@ -1,3 +1,4 @@
#!/bin/bash
apt-cache policy $1 | awk 'NR==5'
apt-cache policy $1 | awk 'NR==5' | xclip -selection clipboard
version=$(apt-cache show $1 | grep Version | awk '{print $2}')
echo $1 $version
echo $1 $version | xclip -select clipboard