shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RES: [shell-script] Comando sed para obter somente nome do shell sem


From: Alexandre Mulatinho
Subject: Re: RES: [shell-script] Comando sed para obter somente nome do shell sem os argumentos
Date: Fri, 16 Nov 2007 13:33:12 -0300

Em 16/11/07, Info Suporte - Rodrigo Nery <address@hidden> escreveu:
>
>   A coluna TTY também pode ser variável:
>
> root 28051 1 0 15:11:59 ? 0:00 sh /util/shell/suporte_001.sh arg01 arg02
>
> root 28051 1 0 Nov 16 tty1 0:00 sh /util/shell/suporte_001.sh arg01 arg02
>
> Preciso que o "sed" obtenha o que está entre a primeira "/" e o próximo
> espaço em branco (ou final da linha, se não houver argumentos).
>
> Obrigado,
>
> Rodrigo
>
> -
>


Rodrigo,

Tenta assim:

$ ps ax | grep " python" | sed -e 's/.* \//\//'

-- 
"KISS (Keep It Simple Stupid!), Slackware Linux." ;)
Alexandre Mulatinho <crudovisk 'at' gmail.com>
Programmer and System Administrator


[As partes desta mensagem que não continham texto foram removidas]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]