10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a shell script where I have to connect t oracle database. I have to store the command in a variable and then run the command through the variable.The OS is solaris 10 and the shell is bash.pls help when I run the command it doesnot work.Thanks.
if
CONNECT= "sqlplus... (4 Replies)
Discussion started by: Rossdba
4 Replies
2. Shell Programming and Scripting
I am trying to store a string value to a temporary variable within my script. When I run the command manually it returns the expected value, but from the script an additional "\r" is at the end.
tCurrentStatus=`cat ${tPC_status} | grep 'Current status' | awk '{print $NF}'`
output:
cat... (1 Reply)
Discussion started by: jxrst
1 Replies
3. UNIX for Dummies Questions & Answers
I'm trying to get a list of all users on the system, store the list in a variable, then find all the files of a certain extension owned by each of the users.
The command I use to get the list is
getent passwd | cut -d: -f1 | sortand this works just fine. However, if I try to store it in a... (1 Reply)
Discussion started by: hobscrk777
1 Replies
4. Red Hat
hey, i have stored values of query like this
val_2=$( sqlplus -s rte/rted1@rel75d1 << EOF
set heading off
select source_id from cvt_istats where istat_id > $val_1;
exit
EOF
)
echo $val_2
now , val_2 has five values displayed like this
1
2
3
4
5
what i have to do is to check the... (1 Reply)
Discussion started by: ramsavi
1 Replies
5. Shell Programming and Scripting
I need help to store the value returned from the function to one variable and then use that variable.
PREVIOUS_DATE_FUNCTION()
{
date '+%m %d %Y' |
{
read MONTH DAY YEAR
DAY=`expr "$DAY" - 1`
case "$DAY" in
0)
MONTH=`expr "$MONTH" - 1`
case... (1 Reply)
Discussion started by: aroragaurav.84
1 Replies
6. Shell Programming and Scripting
can anyone please help me with this:
i have written a shell script and a stored procedure which has one OUT parameter. now i want to use that out parameter as an input to the unix script but i am getting an error as variable not found. below are the unix scripts and stored procedure...
... (4 Replies)
Discussion started by: swap21783
4 Replies
7. Shell Programming and Scripting
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Discussion started by: freddy1228
1 Replies
8. Linux
Hi all,
I have a variable with date as 20080831 . Now I want to increment it as 20080901 and so on.Is there any command for this. Please help me.
thanks
rameez (1 Reply)
Discussion started by: rameezrajas
1 Replies
9. Shell Programming and Scripting
Hi,
I want to write a perl script, which will increment number stored in file. I want to do this without any file handles. I think we have to use some UNIX commands. I am not sure how to do this with file handles.
Thanks, (1 Reply)
Discussion started by: solitare123
1 Replies
10. Shell Programming and Scripting
Hi all,
I want to search for a data type in a line.For this in a loop i am checking for $DATA_TYPE in a line using grep.But grep is not able to find when i give this.
Can any one tell me how to check string in $DATA_TYPE variable in line usign grep (or) any other way to do the above task.
... (4 Replies)
Discussion started by: jisha
4 Replies