Pular para o conteúdo

preciso da saida desse comando no slackware current [RESOLVIDO]

Responder tópico
  • Denunciar
  • Indicar
01 02

1. preciso da saida desse comando no slackware current [RESOLVIDO]

Enviado em 24/05/2020 - 20:16h

Pessoal, to precisando que alguém que usa o Slackware current me forneça a saida para esse comando. Estou usando o Slackware 14.2 e a saída é justamente 14.2.

O comando é esse:

grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g'

Preciso, pois estou bolando um script e estou tentando fazer compatível com várias versões do Slackware.

Responder tópico

2. Re: preciso da saida desse comando no slackware current [RESOLVIDO]

Melhor resposta

Enviado em 24/05/2020 - 20:24h

willian.firmino escreveu:

14.2


cat /etc/os-release

NAME=Slackware
VERSION="14.2"
ID=slackware
VERSION_ID=14.2
PRETTY_NAME="Slackware 14.2 x86_64 (post 14.2 -current)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:14.2"
HOME_URL="http://slackware.com/";
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/";
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/";
VERSION_CODENAME=current

3. Re: preciso da saida desse comando no slackware current [RESOLVIDO]

Enviado em 24/05/2020 - 20:22h

14.2

4. Re: preciso da saida desse comando no slackware current

Enviado em 24/05/2020 - 20:44h

Checking a Slackware Version

To check which version of Slackware you are running, we have two means that are widely used and practical, the first is to read the slackware-version file, which is located in the /etc/ directory. For this you can run the 'cat' command indicating the input file, or simply open it with your favorite editor.
Slackware Version file

$ cat /etc/slackware-version
Slackware 14.2

https://docs.slackware.com/howtos:misc:checking_a_slackware_version

vc bolou esse seu comando aí, vc PLAGIOU do site oficial e ainda quer que o povo testa? não confia nos docs oficias?
Or you can use a more UNIX way of handling things using old rice and beans … So you can also collect the necessary data. For this we execute a pipeline command storing the result inside a variable called version as an example.
$ version=$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')
$ echo "$version"
14.2

5. Re: preciso da saida desse comando no slackware current

Enviado em 24/05/2020 - 21:03h

blaublau22 escreveu:

Checking a Slackware Version

To check which version of Slackware you are running, we have two means that are widely used and practical, the first is to read the slackware-version file, which is located in the /etc/ directory. For this you can run the 'cat' command indicating the input file, or simply open it with your favorite editor.
Slackware Version file

$ cat /etc/slackware-version
Slackware 14.2

https://docs.slackware.com/howtos:misc:checking_a_slackware_version

vc bolou esse seu comando aí, vc PLAGIOU do site oficial e ainda quer que o povo testa? não confia nos docs oficias?
Or you can use a more UNIX way of handling things using old rice and beans … So you can also collect the necessary data. For this we execute a pipeline command storing the result inside a variable called version as an example.
$ version=$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')
$ echo "$version"
14.2


KKKKKKKK,
E ainda vai postar como dica......
sed -n '/VERSION=/s/[^0-9]//gp' /etc/os-release
Obs.: Não é só o Slackware que tem o arquivo com as informações do Sistema:
https://www.linux.org/docs/man5/os-release.html



______________________________________________________________________
Importante: echo -e "\n$(lynx --dump goo.gl/a9KeFc|sed -nr '/^[ ]+Se/,/dou.$/p')\n"
Att.: Marcelo Oliver
______________________________________________________________________

6. Re: preciso da saida desse comando no slackware current [RESOLVIDO]

Enviado em 24/05/2020 - 21:30h


Rapaz, vocês dois têm problemas, certo? Em que momento o cara disse que o comando era dele?
Interpretação de texto mandou lembranças... Se não querem ajudar, não atrapalhem.

7. Re: preciso da saida desse comando no slackware current

Enviado em 25/05/2020 - 00:08h

eu ajudei mano
não posso falar nada mais?
deixa tirar uma na cara dele, mesmo que não for a sua interpretação de texto
seja adulto, aqui tudo está sujeito a tortas interpretações
e desconfiança kkk

8. Re: preciso da saida desse comando no slackware current [RESOLVIDO]

Enviado em 25/05/2020 - 19:35h


johnf escreveu:


Rapaz, vocês dois têm problemas, certo? Em que momento o cara disse que o comando era dele?
Interpretação de texto mandou lembranças... Se não querem ajudar, não atrapalhem.


Tá bravinho , toma suco de maracujá.

______________________________________________________________________
Importante: echo -e "\n$(lynx --dump goo.gl/a9KeFc|sed -nr '/^[ ]+Se/,/dou.$/p')\n"
Att.: Marcelo Oliver
______________________________________________________________________

9. Re: preciso da saida desse comando no slackware current [RESOLVIDO]

Enviado em 25/05/2020 - 19:57h


blaublau22 escreveu:

Checking a Slackware Version

To check which version of Slackware you are running, we have two means that are widely used and practical, the first is to read the slackware-version file, which is located in the /etc/ directory. For this you can run the 'cat' command indicating the input file, or simply open it with your favorite editor.
Slackware Version file

$ cat /etc/slackware-version
Slackware 14.2

https://docs.slackware.com/howtos:misc:checking_a_slackware_version

vc bolou esse seu comando aí, vc PLAGIOU do site oficial e ainda quer que o povo testa? não confia nos docs oficias?
Or you can use a more UNIX way of handling things using old rice and beans … So you can also collect the necessary data. For this we execute a pipeline command storing the result inside a variable called version as an example.
$ version=$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')
$ echo "$version"
14.2


Nessas horas faz falta uma função de bloqueio/ignore de usuários.

10. Re: preciso da saida desse comando no slackware current [RESOLVIDO]

Enviado em 25/05/2020 - 21:36h


johnf escreveu:


Rapaz, vocês dois têm problemas, certo? Em que momento o cara disse que o comando era dele?
Interpretação de texto mandou lembranças... Se não querem ajudar, não atrapalhem.



Pelo menos um que notou. O comando não é meu. É copiado e testei e funciona aqui. Mas pelo que percebi esse comando mesmo para o current ainda mostra 14.2, portanto, vou ter pensar em alguma outra forma de resolver para o current.


___________________________________
Conhecimento não se Leva para o Túmulo.

11. Re: preciso da saida desse comando no slackware current [RESOLVIDO]

Enviado em 25/05/2020 - 21:39h


willian.firmino escreveu:

willian.firmino escreveu:

14.2


cat /etc/os-release

NAME=Slackware
VERSION="14.2"
ID=slackware
VERSION_ID=14.2
PRETTY_NAME="Slackware 14.2 x86_64 (post 14.2 -current)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:14.2"
HOME_URL="http://slackware.com/";
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/";
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/";
VERSION_CODENAME=current


Com essa resposta consigo bolar alguma coisa. Mas quero confirmar. Vou adaptar o comando que mandei testarem no current para ver se ele dá a saída que eu quero.

___________________________________
Conhecimento não se Leva para o Túmulo.

12. Re: preciso da saida desse comando no slackware current [RESOLVIDO]

Enviado em 25/05/2020 - 21:48h


Editei o /etc/os-release e inclui o VERSION_CODENAME=current para simular uma versão current do Slackware e rodei

grep '^VERSION_CODENAME=' /etc/os-release | cut -d '=' -f 2

Saída:
current

Era isso que eu queria.

___________________________________
Conhecimento não se Leva para o Túmulo.
01 02

Responder tópico

Responder tópico

Entre na sua conta para responder.

Fazer login para responder