script for taking the stats from a file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script for taking the stats from a file
# 22  
Old 03-18-2009
+ + uniqsort -c

usage: grep [-E | -F] [-c|-l|-q] [-insvxbhwy] [-p parasep] -e pattern_list...
[-f pattern_file...] [file...]
usage: grep [-E | -F] [-c|-l|-q] [-insvxbhwy] [-p parasep] [-e pattern_list...]
-f pattern_file... [file...]
usage: grep [-E | -F] [-c|-l|-q] [-insvxbhwy] [-p parasep] pattern [file...]
ls: /apps/ins/mga_root/traffic_01/daily_traffic_logs/* not found
+ echo 1 results for /apps/ins/mga_root/traffic_01/09031900010202.TLG in /tmp/203_121935
+ cut -d -f1
cnt=1
+ echo 1 results for /apps/ins/mga_root/traffic_01/09031900010202.TLG in /tmp/203_121935
+ cut -d -f2
acct=results
+ echo Date 20090303 Account results had 1 203's
+ read line
+ echo 09030400010202.TLG
+ cut -c 1-6
day=090304
+ read line
+ 203 09030400010202.TLG
+ grep
+ cut -d, -f3

the script is giving errors
# 23  
Old 03-19-2009
replace the `ls <file-wildcard>` with just a single file name. Break each command down so you know what they are doing and that they work with a single file. Then you can workout why passing in the list of files is failing.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute Oracle gather stats via shell script

Hi , I am trying to automate a gather stats in shell script #!/usr/bin/ksh export ORACLE_HOME=/orcl/app/oracle/product/11.2.0.1/db_1 export PATH="$PATH:$ORACLE_HOME/bin" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ORACLE_HOME/lib32" export TNS_ADMIN=/opt/netprobe/config... (1 Reply)
Discussion started by: neil.k
1 Replies

2. Shell Programming and Scripting

Taking error message from XML file, amending to script

Hello all, I have a question about creating a script that will look for messages on one of our MQ series systems, and fix them. Currently, if we issue a command for example Command.sh errors it gives us: ID:c3e2d840d4f3f3d74040404040404040cb2ef4e62f70f702 <?xml version="1.0"... (3 Replies)
Discussion started by: jeffs42885
3 Replies

3. Shell Programming and Scripting

Script taking more time in CRONTAB

Hello All, I have created a shell script, When i run it manually as ./<script_name> it takes 5 hours to run, but when i am scheduling it in crontab, it is taking 20 hours to run. Please help me and advice, what can be done to reduce the time in crontab. Thank you (6 Replies)
Discussion started by: anand2308
6 Replies

4. Shell Programming and Scripting

Script to load daily average I/O stats from a .ksh file into Oracle db

Hi can anyone help me with a script to load output of the .ksh file into an Oracle database. I have attached sample output of the information that i need to load to the database (2 Replies)
Discussion started by: LucyYani
2 Replies

5. Shell Programming and Scripting

How to ftp multiple files by taking the file name from a input file.

Hi, I'm working on a script which has to copy multiple files from one server to another server. The list of files that are to be copied is present in a file say input.txt. vi input.txt abc.c welcome.c new.c welcome1.c for ftp'ing a single file say 'new.c' the following code... (2 Replies)
Discussion started by: i.srini89
2 Replies

6. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

7. Shell Programming and Scripting

Perl script for taking inputs from one script and storing them into a document.

Hi. I wanted to create a Perl script which can take the outputs of a Perl script as it's input and temporarily store them in a document. Need help. Thanks.:) (8 Replies)
Discussion started by: xtatic
8 Replies

8. Shell Programming and Scripting

script to update the stats

Hi, I am using the below shell script to update the webalizer stats: #!/bin/bash username='elogic1' domain='abcd.com' path_to_webalizer='/hsphere/shared/bin/webalizer' path_to_logs='/hsphere/local/home/elogic1/logs/abcd.com'... (4 Replies)
Discussion started by: gsiva
4 Replies

9. Shell Programming and Scripting

Newbie to perl - Help with stats script

Hi, this is my first post so here goes..... I need help... I am trying to write a script to produce some stats based on a number of searches in a log file. Now i know how to do this using multiple variables which are really just greps, but I want a more efficent way of doing this as my poor... (1 Reply)
Discussion started by: ARwebble
1 Replies

10. Shell Programming and Scripting

script to gather weblogic jvm heap size stats

Hello, has anyone written something that will monitor/gather weblogic heap info ? I need to gather size, high/low stats to a file that I can upload to a speadsheet thanks for your help! (2 Replies)
Discussion started by: galenw
2 Replies
Login or Register to Ask a Question