1. Pegar todo o conteudo de Descrição do arquivo control
removidousa Nenhuma
Post recolhido
Enviado em 19/08/2021 - 21:35h
Arquivo control:
Package: rejaal
Version: 2.0
Maintainer: foxoman <www.omania2.net>
Installed-Size: 3200
Priority: extra
Section: utils
Essential: NO
Architecture: i386
Description: Men around the prophet .
.
( Made with Debian Package Maker 0.4.1 )
.
<http://debianpackagemaker.blogspot.com>
.
2. Re: Pegar todo o conteudo de Descrição do arquivo control
leandropscarduausa Ubuntu
Post recolhido
Enviado em 19/08/2021 - 22:09h
[Não testado] tente
sed -n '/^Description/p' arquivo.txt | cut -d ':' -f2
3. Re: Pegar todo o conteudo de Descrição do arquivo control
removidousa Nenhuma
Post recolhido
Enviado em 19/08/2021 - 22:27h
leandropscardua escreveu:
[Não testado] tente
sed -n '/^Description/p' arquivo.txt | cut -d ':' -f2
$ cat control
Source: package-converter
Version: 3.0.0.2-2
Section: util
Priority: extra
Maintainer: foxoman <foxoman.googlecode.com>
Package: package-converter
Architecture: all
Depends: alien , fakeroot
Description: Package Converter
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
Só pega a linha 1
$ sed -n '/^Description/p' control | cut -d ':' -f2
Package Converter
Já testei com sed, grep, tail e nada de pegar só a parte Description: do arquivo control
4. Re: Pegar todo o conteudo de Descrição do arquivo control
msoliverusa Debian
Post recolhido
Enviado em 20/08/2021 - 00:51h
Minions, veja se é isso:
sed '/^Description/,/$/!d' arquivo.txt|sed 's/Description: //'
Package Converter
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
--------------------------------------------------------------------------------------------------------------
awk -F":" 'NF==1' arquivo.txt
--------------------------------------------------------------------------------------------------------------
str=$(awk -F": " '/^Description/{print $2}' arquivo.txt)
awk "/^${str}/" arquivo.txt
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
5. Re: Pegar todo o conteudo de Descrição do arquivo control
removidousa Nenhuma
Post recolhido
Enviado em 20/08/2021 - 13:35h
msoliver escreveu:
Minions, veja se é isso:
sed '/^Description/,/$/!d' arquivo.txt|sed 's/Description: //'
Package Converter
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
--------------------------------------------------------------------------------------------------------------
awk -F":" 'NF==1' arquivo.txt
--------------------------------------------------------------------------------------------------------------
str=$(awk -F": " '/^Description/{print $2}' arquivo.txt)
awk "/^${str}/" arquivo.txt
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
Package: rejaal
Version: 2.0
Maintainer: foxoman <www.omania2.net>
Installed-Size: 3200
Priority: extra
Section: utils
Essential: NO
Architecture: i386
Description: Men around the prophet .
.
( Made with Debian Package Maker 0.4.1 )
.
<http://debianpackagemaker.blogspot.com>
.
Vai ter que usar os dois comandos para pegar a Description?
Men around the prophet .
.
.
( Made with Debian Package Maker 0.4.1 )
.
.
6. Re: Pegar todo o conteudo de Descrição do arquivo control
msoliverusa Debian
Post recolhido
Enviado em 20/08/2021 - 17:54h
Minions escreveu:
msoliver escreveu:
Minions, veja se é isso:
sed '/^Description/,/$/!d' arquivo.txt|sed 's/Description: //'
Package Converter
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
--------------------------------------------------------------------------------------------------------------
awk -F":" 'NF==1' arquivo.txt
--------------------------------------------------------------------------------------------------------------
str=$(awk -F": " '/^Description/{print $2}' arquivo.txt)
awk "/^${str}/" arquivo.txt
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
Package: rejaal
Version: 2.0
Maintainer: foxoman <www.omania2.net>
Installed-Size: 3200
Priority: extra
Section: utils
Essential: NO
Architecture: i386
Description: Men around the prophet .
.
( Made with Debian Package Maker 0.4.1 )
.
<http://debianpackagemaker.blogspot.com>
.
Vai ter que usar os dois comandos para pegar a Description?
Men around the prophet .
.
.
( Made with Debian Package Maker 0.4.1 )
.
.
Minions,
Se o comando não lhe atendeu....
É simples, Não utilize!
A intenção foi das melhores.....
Mas, como sempre "ai" nada funciona!
Provável problema na "B.I.O.S".... :)
Frase muito antiga, dos primórdios da informática.
7. Re: Pegar todo o conteudo de Descrição do arquivo control
removidousa Nenhuma
Post recolhido
Enviado em 20/08/2021 - 20:32h
msoliver escreveu:
Minions escreveu:
msoliver escreveu:
Minions, veja se é isso:
sed '/^Description/,/$/!d' arquivo.txt|sed 's/Description: //'
Package Converter
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
--------------------------------------------------------------------------------------------------------------
awk -F":" 'NF==1' arquivo.txt
--------------------------------------------------------------------------------------------------------------
str=$(awk -F": " '/^Description/{print $2}' arquivo.txt)
awk "/^${str}/" arquivo.txt
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
Package: rejaal
Version: 2.0
Maintainer: foxoman <www.omania2.net>
Installed-Size: 3200
Priority: extra
Section: utils
Essential: NO
Architecture: i386
Description: Men around the prophet .
.
( Made with Debian Package Maker 0.4.1 )
.
<http://debianpackagemaker.blogspot.com>
.
Vai ter que usar os dois comandos para pegar a Description?
Men around the prophet .
.
.
( Made with Debian Package Maker 0.4.1 )
.
.
Minions,
Se o comando não lhe atendeu....
É simples, Não utilize!
A intenção foi das melhores.....
Mas, como sempre "ai" nada funciona!
Provável problema na "B.I.O.S".... :)
Frase muito antiga, dos primórdios da informática.
Boa noite amigo msoliver,
Sabe se existe algum comando no linux que pega o conteúdo de Description: para abaixo?
Obrigado
8. Re: Pegar todo o conteudo de Descrição do arquivo control
msoliverusa Debian
Post recolhido
Enviado em 20/08/2021 - 21:30h
Minions, tudo indica que os arquivos não seguem um padrão.
no control, que vc postou,
Após a linha "Description: Package Converter", está tudo em uma linha:
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
E, obviamente, os comandos sugeridos, são baseados nesse que vc postou.....
Verifique se a informação desejada, é "TUDO" que está após a frase:
"Description: Package Converter"
até o final do arquivo, caso positivo, o comando sed deve atender:
sed '/^Description/,/$/!d' arquivo.txt|sed 's/Description: //'
COMO FUNCIONA:
sed '/^Description/,/$/!d' arquivo.tx => Casa da linha que começa com: ^Description,
até o fim do arquivo.
sed 's/Description: //' => Apaga "Description: "
______________________________________________________________________
Att.: Marcelo Oliver
______________________________________________________________________
9. Re: Pegar todo o conteudo de Descrição do arquivo control
removidousa Nenhuma
Post recolhido
Enviado em 20/08/2021 - 22:32h
msoliver escreveu:
Minions, tudo indica que os arquivos não seguem um padrão.
no control, que vc postou,
Após a linha "Description: Package Converter", está tudo em uma linha:
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
E, obviamente, os comandos sugeridos, são baseados nesse que vc postou.....
Verifique se a informação desejada, é "TUDO" que está após a frase:
"Description: Package Converter"
até o final do arquivo, caso positivo, o comando sed deve atender:
sed '/^Description/,/$/!d' arquivo.txt|sed 's/Description: //'
COMO FUNCIONA:
sed '/^Description/,/$/!d' arquivo.tx => Casa da linha que começa com: ^Description,
até o fim do arquivo.
sed 's/Description: //' => Apaga "Description: "
______________________________________________________________________
Att.: Marcelo Oliver
______________________________________________________________________
Ver se ai esta ocorrendo o mesmo problema para ti.
$ cat control
Package: rejaal
Version: 2.0
Maintainer: foxoman <www.omania2.net>
Installed-Size: 3200
Priority: extra
Section: utils
Essential: NO
Architecture: i386
Description: Men around the prophet .
.
( Made with Debian Package Maker 0.4.1 )
.
<http://debianpackagemaker.blogspot.com>
$sed '/^Description/,/$/!d' control|sed 's/Description: //'
Men around the prophet .
.
É uma verdade não existe um padrão para o arquivo control dos pacotes .deb
10. Re: Pegar todo o conteudo de Descrição do arquivo control
msoliverusa Debian
Post recolhido
Enviado em 20/08/2021 - 23:23h
Minions escreveu:
msoliver escreveu:
Minions, tudo indica que os arquivos não seguem um padrão.
no control, que vc postou,
Após a linha "Description: Package Converter", está tudo em uma linha:
Package Converter is an ALIEN frontend . Alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. It also supports LSB packages.
E, obviamente, os comandos sugeridos, são baseados nesse que vc postou.....
Verifique se a informação desejada, é "TUDO" que está após a frase:
"Description: Package Converter"
até o final do arquivo, caso positivo, o comando sed deve atender:
sed '/^Description/,/$/!d' arquivo.txt|sed 's/Description: //'
COMO FUNCIONA:
sed '/^Description/,/$/!d' arquivo.tx => Casa da linha que começa com: ^Description,
até o fim do arquivo.
sed 's/Description: //' => Apaga "Description: "
______________________________________________________________________
Att.: Marcelo Oliver
______________________________________________________________________
Ver se ai esta ocorrendo o mesmo problema para ti.
$ cat control
Package: rejaal
Version: 2.0
Maintainer: foxoman <www.omania2.net>
Installed-Size: 3200
Priority: extra
Section: utils
Essential: NO
Architecture: i386
Description: Men around the prophet .
.
( Made with Debian Package Maker 0.4.1 )
.
<http://debianpackagemaker.blogspot.com>
$sed '/^Description/,/$/!d' control|sed 's/Description: //'
Men around the prophet .
.
É uma verdade não existe um padrão para o arquivo control dos pacotes .deb
Testei aqui com vários, funcionou.
apt show acpi 2>/dev/null|sed -n '/Description:/,/^$/p'
Description: exibe informações sobre dispositivos ACPI
Este pacote tenta reproduzir a funcionalidade do 'velho' comando apm em
sistemas ACPI, incluindo informação de bateria e de temperatura. Ele não
suporta suspensão ACPI, apenas exibe informações sobre os dispositivos ACPI.
--------------------------------------------------------------------------------------------------------
apt show linuxlogo 2>/dev/null|sed -n '/Description:/,/^$/p'
Description: logotipo do sistema com cores ANSI
Um logotipo do sistema com cores ANSI com algumas informações do sistema que
podem ser exibidas em tempo de inicialização do sistema ou, com alguma
configuração local, no prompt de login. Quatro logotipos diferentes estão
disponíveis:
.
* Debian Swirl (default);
* Debian banner;
* Tux clássico e banner.
.
Os logotipos clássico e banner são baseados no pinguim de Larry Ewing.
Estão incluídas as versões ASCII monocromáticas de todos os logotipos.
----------------------------------------------------------------------------------------------------------------
Ou
dpkg -I pacope.deb |sed -n '/Description:/,/^$/p'
______________________________________________________________________ Importante: lynx --dump goo.gl/a9KeFc|sed -nr '/^[ ]+Se/,/dou.$/p'
Att.: Marcelo Oliver
______________________________________________________________________ Nota de esclarecimento:
O comando: lynx --dump goo.gl/a9KeFc|sed -nr '/^[ ]+Se/,/dou.$/p',
faz parte da minha assinatura.
O qual, "filtra" a página: "https://www.vivaolinux.com.br/termos-de-uso/",
Mostrando o seguinte:
Se você sanou sua dúvida ou resolveu um problema a partir de um
tópico criado, é extremamente recomendável que acesse o tópico e
marque-o como "RESOLVIDO". E mais recomendável ainda que você eleja
como melhor resposta a que mais lhe ajudou.