grep -- suma de numeros


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting grep -- suma de numeros
# 1  
Old 12-02-2009
grep -- suma de numeros

tengo un shell el cual hace un grep a un log el cual me arroja algo similar a esto


12/01/09 17:18.26 ARCHIVO OK - No. Reg procesados: 500

En ocasiones en un solo log me genera mas de 500 registros procesados, los registros el log lo graba en cantidades de 500.

lo que tengo que haces es sumar solamente las cantidades y ponerle un total.

este es mi shell el cual hace el grel al log





grep $pdf".PDF" "TDCORO""-"$Fecha".log" | grep "ARCHIVO ORIGEN"
grep "procesados" "TDCORO""-"$Fecha".log"
if grep "No existen archivos" "TDCORO""-"$Fecha".log" > /dev/null
then
echo " ARCHIVO ORIGEN : TDCORO_001_"$nodate".PDF"
echo $noreg $notime "ARCHIVO OK - No. Reg procesados: 0"
# 2  
Old 12-02-2009
can you post your question in english??
# 3  
Old 12-02-2009
yes please post in english.....
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. AIX

Configure HTTP proxy in SUMA

Hi, I am trying to configure an HTTP_PROXY so that suma can reach out beyond our intranet and pull updates from the IBM website. Currently, our suma config is the default as it's not been used before. When I attempt to issue the following command sudo suma... (7 Replies)
Discussion started by: JAR1
7 Replies

2. Shell Programming and Scripting

Inconsistent `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`

i have this line of code that looks for the same file if it is currently running and returns the count. `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l` basically it is assigned to a variable ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies

3. AIX

SUMA does not download

Hi, whenever i try to download SP's/TL's using SUMA on my blade aix 5.3 p6 server, i get this error message each time. 0500-013 Failed to retrieve list from fix server. Do i need to change SUMA settings? currently it is configured as: Screen output verbosity ... (9 Replies)
Discussion started by: muzahed
9 Replies

4. AIX

How to set up SUMA i n AIX Environment

Hi , How to set up SUMa in AIX environment. Any suggestions? Thanks, Sureeh C (3 Replies)
Discussion started by: choudarysuresh
3 Replies

5. Shell Programming and Scripting

MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else

Hi Guys, I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys. MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' ` Harby. (4 Replies)
Discussion started by: hariza
4 Replies
Login or Register to Ask a Question