It's staring me in the face.
This time it is the alias!
You are unwittingly creating variables in your environment from the first run which are available to the second run.
Quote:
ts_size='. ~/util/sql/ts_size.sh'
The problem is the "dot-space" in the alias. This causes the script to be executed in the current environment rather than in a clean Shell. It is a useful feature of Shell ... but you don't want to use it here.
Sorry, I did not see your post...here is the code as it stands now. I played around with the ` and {} surrounding the variables. But no luck.
As you can see, I have removed the ` and it still behave incorrectly.
My logic for calculating wild is correct as you mention. I am testing if the input has a wild character which in this case is "%". So a non zero value confirms it. Based on that I set = or like.
However, once I use the wild character, it seems to remember it for the next run.
and the alias is defined as:
---------- Post updated at 07:16 PM ---------- Previous update was at 07:04 PM ----------
Hi Methyl,
Is there a way to give you multiple thanks...that's it. The alias was the culprit in the end, plus the earlier fixes with spaces etc..
Hi
can some one please help me how i can get the output i require:
My text file "sample.txt" contains the text like below
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_fedora-lv_root
15G 2.6G 12G 19% /hari
Filesystem Size ... (3 Replies)
I'm new to unix script, and I need to check the tablespaces daily, here is the script(quite simple), but it does not work. Did I missed something ?
Please guide me, Many thanks !
#!/bin/sh
echo "ORA TABLEASPACE:"
sqlplus system/oracle as sysdba;
set pagesize 9999;
set linesize 132;
... (5 Replies)
I have prepared the below script to monitor the tablespace and alert the users whenever it reaches a threshold limit.
#!/bin/sh
. /home/.profile
sqlplus -s $LOGON << .eof > $scripts/check_tablespace.temp
set pages 0
select tablespace_name, free_percent
from (
SELECT... (4 Replies)
Hi
Linux
Set up - alias ls='ls -l'
Then run script
#! /bin/ksh
sub()
{
ls
}
sub
Is there any way to get it working. I don't want to define alias inside of the program
Thank you (2 Replies)
Hi ,
I am trying to run this script in crontab but I get errors. When I run it explicitly like ./monitor_tblsp from another location then it runs fine . I am messing somewhere with paths but I don't know where and how . Please help .
Here is the error part
./monitor_tblsp: touch: not... (2 Replies)
Hi,
I need to execute a script to find the tablespace size in oracle.But i get an error.:confused:
Script Executed:-
#!/bin/ksh
ORACLE_SID= oracelinstance
ORACLE_HOME= oracle path
PATH=$ORACLE_HOME/bin
export ORACLE_SID ORACLE_HOME PATH
sqlplus... (4 Replies)
Bourne: How to invoke an alias from within a shell script
If I type in the alias in the command line, it runs
If I insert that same alias into my shell script and run the shell script, the alias is not invoked.
Help please. (2 Replies)
Hi,
I want to use an 'if statement' that will check if a certian file is greater in size than a certain value given by the user, but cannot get it to work. Do you have any ideas how this can be done?
Your help is appreciated! (6 Replies)