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

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

Re: [shell-script] Espaços em brancos


From: Marco Sinhoreli
Subject: Re: [shell-script] Espaços em brancos
Date: Thu, 15 Sep 2005 12:30:09 -0300

Olá Fabio,

Em 15/09/05, fabiobat2002<address@hidden> escreveu:
>  Fala Pessoal,
>  
>  Estou gostando realmente de mexer com sheel-script!!
>  
>  Uma duvida
>  
>  Tenho o seguinte cenario
>  
>  [sptopr1] /set13/relatorio > wc -l teste.txt
>        35 teste.txt
>  
>  Estou criando a variavel
>  [sptopr1] /set13/relatorio > VAR=`wc -l "teste.txt"`
>  [sptopr1] /set13/relatorio > echo $VAR
>  35 teste.txt
>  
>  Como faço so para pegar o numero , sem o nome do arquivo ?

VAR=$(wc -l teste.txt | awk '{print $1}')


-- 
Marco Sinhoreli


reply via email to

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