Help related to clearing of shell scripting doubt


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help related to clearing of shell scripting doubt
# 1  
Old 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.
# 2  
Old 04-10-2013
It is actually checking whether the variabe _TABLESPACE_OFFLINE is empty or not.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell scripting Variable doubt

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

2. Shell Programming and Scripting

Clearing leading and trailing blanks from a string in C Shell

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

3. Shell Programming and Scripting

Unix scripting related queries

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

4. Shell Programming and Scripting

Clearing part of screen in Korn Shell

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

5. Shell Programming and Scripting

Bash shell scripting doubt

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

6. Shell Programming and Scripting

doubt - array related

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

7. Shell Programming and Scripting

Scripting related .

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

8. UNIX for Dummies Questions & Answers

some doubt related to SAR

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

9. Shell Programming and Scripting

Bash scripting doubt

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

10. Shell Programming and Scripting

Shell scripting basic doubt

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
Login or Register to Ask a Question