Sponsored Content
Full Discussion: script to update the stats
Top Forums Shell Programming and Scripting script to update the stats Post 302366480 by peterro on Thursday 29th of October 2009 03:20:27 PM
Old 10-29-2009
How about...

Code:
#!/bin/bash

username='elogic1'
domains='abcd.com efgh.com ijkl.com'
path_to_webalizer='/hsphere/shared/bin/webalizer'
path_to_logs='/hsphere/local/home/elogic1/logs/abcd.com'
output_dir_statistics='/hsphere/local/home/elogic1/abcd.com/webalizer'

for domain in $domains
do
  log_file=`ls $path_to_logs/$domain*|grep -v .gz`
  cat $log_file|$path_to_webalizer -n $domain -o $output_dir_statistics
done

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script: want to insert values in database when update script runs

Hi , I am new to linux and also also to shell scripting. I have one shell script which unpacks .tgz file and install software on machine. When this script runs I want to insert id,filename,description(which will be in readme file),log(which will be in log file) and name of unpacked folder... (1 Reply)
Discussion started by: ring
1 Replies

2. 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

3. AIX

system stats

I recieved this out put below soemhow. Unfortunatly I did not write down the command I used to get it. Can someone tell me what command I use to gather these stats? OS = AIX 5.3 64Bit System Model: IBM,7026-6H1 Machine Serial Number:... (2 Replies)
Discussion started by: rocker40
2 Replies

4. AIX

IO Stats

Aix 5.3 I am trying to view the IO stats. I do the sar 5 5 but that is the WIO and si different than the IO stats right? I am just blanking on this. I know there is a command that I used to run that brings up a whole bunch of live stats that run live such as mem and so on just can't rememeber... (4 Replies)
Discussion started by: rocker40
4 Replies

5. Shell Programming and Scripting

script for taking the stats from a file

i have file which contains data like this every day.i need to pull up a report for counting the 203's in that file for each subscriber id.there are around 200 subscriber id's. all ths Y's which i have written in the script are the subscriber id's.could some one give me an idea as to how do it in... (22 Replies)
Discussion started by: archana234
22 Replies

6. 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

7. 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

8. 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
RBASH(1)						      General Commands Manual							  RBASH(1)

NAME
rbash - restricted bash, see bash(1) RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow- ing are disallowed or not performed: o changing directories with cd o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV o specifying command names containing / o specifying a filename containing a / as an argument to the . builtin command o specifying a filename containing a slash as an argument to the -p option to the hash builtin command o importing function definitions from the shell environment at startup o parsing the value of SHELLOPTS from the shell environment at startup o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators o using the exec builtin command to replace the shell with another command o adding or deleting builtin commands with the -f and -d options to the enable builtin command o using the enable builtin command to enable disabled shell builtins o specifying the -p option to the command builtin command o turning off restricted mode with set +r or set +o restricted. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script. SEE ALSO
bash(1) GNU Bash-4.0 2004 Apr 20 RBASH(1)
All times are GMT -4. The time now is 04:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy