04-10-2013
Help related to clearing of shell scripting doubt
Hello Gurus,
Can anybody please help me to understand as what does this lines(Marked in bold) does:
_TABLESPACE_OFFLINE=`cat ${_tmp_res} | grep -iv "online" | grep -v "^[ ]*$" | grep -iv "SQL>"` ------->1
if [ "X${_TABLESPACE_OFFLINE}" != "X" ];then
_tmp_tablespace_status=1
if_need_raise_alarm
Output of _TABLESPACE_OFFLINE from line 1 is:
TABLESPACE_NAME STATUS
------------------------------ ---------
EMA_PROCLOG_20120918 READ ONLY
EMA_PROCLOG_20120919 READ ONLY
EMA_PROCLOG_20120920 READ ONLY
TABLESPACE_NAME STATUS
------------------------------ ---------
EMA_PROCLOG_20120921 READ ONLY
EMA_PROCLOG_20120922 READ ONLY
EMA_PROCLOG_20120923 READ ONLY
EMA_PROCLOG_20120924 READ ONLY
EMA_PROCLOG_20120925 READ ONLY
EMA_PROCLOG_20120926 READ ONLY
EMA_PROCLOG_20120927 READ ONLY
20 rows selected.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a script called sam.sh which consists of a single echo statement like this
#/usr/bin/ksh
echo "Mani"
I changed the mode for the script by giving chmod a+x sam.sh.
If I want to execute the scrpt by just giving the name at the command line "sam.sh", what should I necessarily do?... (3 Replies)
Discussion started by: sendhilmani123
3 Replies
2. Shell Programming and Scripting
i need to check if any user has logged-in more than once in different terminals and then print the count of those login, so i wrote this command,
who -H | wc -l
but i feel its not accurate , something is wrong ,i have been trying for a long time by trial n error to solve it, but i need... (2 Replies)
Discussion started by: xiphias
2 Replies
3. UNIX for Dummies Questions & Answers
hi
i am trying to monitor server activity through SAR command when i run
$ sar -u 1 20
i get output as time , %usr , %sys , %io , %idle i want to know what is %usr like its all user processes for on that server or just process of current user i think this indicates all server processes not... (1 Reply)
Discussion started by: zedex
1 Replies
4. Shell Programming and Scripting
Could any body give the solution/script to get the below...
1.script will run and detcect the files having 0kb size , and give the solution in a out put file.(Will search the file in the path let say /abc/M/)
2.Same as the above also send a mail to your mails id , with the file name stating... (13 Replies)
Discussion started by: alexMar
13 Replies
5. Shell Programming and Scripting
hi,
Can someone give me some clues how will i be able to check if variable is matching a list of values. As of now im able to do it with 'if' , 'for' and 'arrays', if there is any easy method to do it, please let me know. switch case is also not needed.
./file.sh read
LIST = "read... (1 Reply)
Discussion started by: BalajiUthira
1 Replies
6. Shell Programming and Scripting
Hello All,
I am setting up a cron job, where i am calling a shell script to make few builds. I got struck at a point, need some expert inputs to proceed further.
The script is categorized in 5 parts and in the last part while building software it asks for few questions like:-
1. Build mode... (4 Replies)
Discussion started by: sahil_jammu
4 Replies
7. Shell Programming and Scripting
Hi,
I am writing a menu driven Korn script where I am getting some input from the users (host details, like Hostname, HBA WWN, Devices etc...). I face a challenge when the number of input lines goes past my window size. For this reason, I am planning to use a part of the screen for user input, say... (3 Replies)
Discussion started by: lasko
3 Replies
8. Shell Programming and Scripting
Hi,
I need to know wat does if ! >$tmp_out in the below script mean:
tmp_out=$SCRATCH_DIR/file_cat.$$.tmp
if
! > $tmp_out
then
print "Could not initialize temorary file" >&2
my_exit_code=21
break
fi
---------- Post updated at 04:28 AM ----------... (4 Replies)
Discussion started by: abhishek.gupta
4 Replies
9. Shell Programming and Scripting
Does anyone know of a way with C Shell that will work on both Linux and Sun to clear all leading and trailing blanks from a previously specified string? I am using the following code to replace blanks with underscores:
set Company = `echo $Company | sed 's/ /_/g
but I don't want any... (1 Reply)
Discussion started by: phudgens
1 Replies
10. Shell Programming and Scripting
Dear Friends,
If i give the command echo $- i am getting output of himBH. Can some body explain what does it means
echo $-
himBH
Thanks in Advance
Rajkumar (2 Replies)
Discussion started by: rajkumarin
2 Replies
LEARN ABOUT NETBSD
zegrep
ZGREP(1) BSD General Commands Manual ZGREP(1)
NAME
zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files
SYNOPSIS
zgrep [grep-flags] [--] pattern [files ...]
zegrep [grep-flags] [--] pattern [file ...]
zfgrep [grep-flags] [--] pattern [file ...]
DESCRIPTION
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1).
The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern
argument.
zegrep calls egrep(1), while zfgrep calls fgrep(1).
EXIT STATUS
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0.
SEE ALSO
egrep(1), fgrep(1), grep(1), gzip(1), zcat(1)
AUTHORS
Thomas Klausner <wiz@NetBSD.org>
BSD
December 28, 2003 BSD