My question to you is why you want to complicate your life with this?
iostat, sar, and vmstat they all take <interval> and <count> as arguments. If you want to run them all in one script, merely do:
and run it like
If you want to get the output of just one command, then just use the command.
Dear All,
I have one script which accepts database name and user_id from the user, i have another script that will unload the data from all the tables based on the user_id accepted by the user. How can i pass the user_id from the 1st script to the other. My OS is sun solaris. Thanks in... (3 Replies)
Hi all,
I'm new to Shell scripting. In my shell script for Bourne shell, the script accepts a date parameter which is optional. If the value is supplied, the supplied value should be assigned to a variable. If not, the current date will be assigned to the variable. My script is like this.
#!... (9 Replies)
Hi All,
i have script like below..
echo "1) first option"
echo ""
echo "2) second option"
echo ""
echo "*) please enter the correct option"
read select
case $select in
1) echo "first option selected"
;;
2) echo "second option selected"
;;
*) echo "please enter the correct... (4 Replies)
I'm trying to figure out what's getting passed as the argument when I try to pass a directory as an argument, and I'm getting incredibly strange behavior. For example, from the command line I'm typing:
nawk -f ./test.awk ~
test.awk contains the following:
{
directory = $NF
print... (13 Replies)
Hi all:
I'm trying to pass an argument to a command but it's being difficult.
#!/bin/bash
set -xv
if ; then
echo "More than 1 argument entered"
echo "Please enter a month using 3 character names, ie, Jan, Mar, Apr, Dec" && exit 1
fi
if ; then
echo "Please enter a month using... (2 Replies)
Hi,
I have a script that is scheduled with cron and runs every night. The cron part looks like this:
00 20 * * 0,1,2,3,4,5,6 /usr/local/bin/BACKUP TBTARM HOT DELETE
My issue is with the 3rd parameter. Somewhere in the script, i want to tell the script to delete some files if the 3rd... (7 Replies)
How to pass the alphabet character as a argument in case and in if block?
ex:
c=$1
if a-z ]]
then
echo "alphabet"
case $1 in
a-z) echo "the value is a alphabet"
edit by bakunin: please use CODE-tags. We REALLY mean it. (9 Replies)
Hi
I have a script which am trying to pass an argument which am trying to call using $1 but its not taking the value inside the if loop as it showing the error as if: Empty if..
Any help on this will be helpful.
#!/usr/bin/csh
echo $1
if ('$1' == "pp")
then
echo "Printing $1"
endif (4 Replies)
I am trying to pass a second argument like so:
if ] then
export ARG2=$2
else
message "Second argument not specified: USAGE - $PROGRAM_NAME ARG1 ARG2"
checkerror -e 2 -m "Please specify if it is a history or weekly (H or W) extract in the 2nd argument"
fi
however, it always goes... (4 Replies)
Discussion started by: MIA651
4 Replies
LEARN ABOUT REDHAT
sa1
SA1(8) Linux User's Manual SA1(8)NAME
sa1 - Collect and store binary data in the system activity daily data file.
SYNOPSIS
/usr/lib/sa/sa1 [ interval count ]
DESCRIPTION
The sa1 command is a shell procedure variant of the sadc command and handles all of the flags and parameters of that command. The sa1 com-
mand collects and store binary data in the /var/log/sa/sadd file, where the dd parameter indicates the current day. The interval and count
parameters specify that the record should be written count times at interval seconds. If you do not specify these parameters, a single
record is written.
The sa1 command is designed to be started automatically by the cron command.
EXAMPLES
To create a daily record of sar activities, place the following entry in your root or adm crontab file:
0 8-18 * * 1-5 /usr/lib/sa/sa1 1200 3 &
FILES
/var/log/sa/sadd
Indicate the daily data file, where the dd parameter is a number representing the day of the month.
AUTHOR
Sebastien Godard <sebastien.godard@wanadoo.fr>
SEE ALSO sar(1), sadc(8), sa2(8), mpstat(1), iostat(1), vmstat(8)
http://perso.wanadoo.fr/sebastien.godard/
Linux DECEMBER 1999 SA1(8)