10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi ,
Can any please help the below requirement on all multiple servers and multiple dbs.
update configuration set value='yes' ;1)
the above statement apply on 31 Databases at a time on different Ip address
eg : 10.104.1.12 (unix ip address )
the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
2. Shell Programming and Scripting
Hi All,
I need to read values of 10 columns from oracle query and assign the same to 10 unix variables. The query will return only one record(row).
I tried to append all these columns using a delimiter(;) in the select query and assign the same to a single variable(V) in unix. I thought I... (3 Replies)
Discussion started by: hkrishnan91
3 Replies
3. Shell Programming and Scripting
Hello,
I would like to ask for help with csh script.
An example of an input in .txt file is below, the number of lines varies from file to file and I have 2 or 3 columns with values. I would like to read all the values (probably one by one) and set them to independent unique variables that... (7 Replies)
Discussion started by: FMMOLA
7 Replies
4. Shell Programming and Scripting
Hi All,
i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way??
#!/bin/ksh
##script is sample.ksh
age=$1
gender=$2
class=$3
.
.
.... (3 Replies)
Discussion started by: Lakshman_Gupta
3 Replies
5. Shell Programming and Scripting
#!/bin/bash
#timetest
TIMENOW="$(date)"
T1=12:00:00
echo $TIMENOW >timenow
cat timenow |cut -f4 -d' ' >time1
T2=$(sed -n "${1}p" time1)
echo "T1 = " $T1
echo "T2 = " $T2
if then
echo $T1
else
echo $T2
fi
I thought scripting was simple! So why does this script result in:
T1 =... (4 Replies)
Discussion started by: habuchas
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
i can print 2nd, 4th and 6th columns in a file using the shell command:
awk -F "|" '{print $2 $4 $6}' file1.txt
Now, the position and number of columns can be variable and from a variable POSLIST
So let's say
POSLIST='$2 $4 $6'
when i use the command:
a)
awk -F "|" '{print... (2 Replies)
Discussion started by: ysrini
2 Replies
7. Shell Programming and Scripting
is it possible to call a variable in a case statement, for example
lsmonth=Jan|Feb
l |while read ans
do
mymonth=`echo $ans |awk '{print $6}'`
case $mymonth in
$lsmonth) echo do something
;;
*) echo do something else
;;
esac
done
I want to use $lsmonth... (8 Replies)
Discussion started by: gefa
8 Replies
8. Shell Programming and Scripting
I am just wondering if it's possible to refer to variables within a sed statement as follows:-
cat $file | sed -e 1's/$oldtext/$newtext/' > $file
as when I run the script, the variables are not recognised and nothing happens..??
Thanks (5 Replies)
Discussion started by: sirtrancealot
5 Replies
9. Shell Programming and Scripting
I have the following
--------------------
foreach var (STO SNY WKF)
set ta = 5
end
---------
How can I echo both variables at the same time. Something to the effect of
echo ${$var}ta
But this doesn't work. Seems like it would. Thanks. (4 Replies)
Discussion started by: wxornot
4 Replies
10. UNIX for Dummies Questions & Answers
With the if statement:
if
How can I make it so it accepts a wildcard after the ${CURR_DAY_MONTH} variable?
Putting
a -f /webtrends/SUN/mrw2/access.${CURR_DAY_DAY}${CURR_DAY_MONTH}*
won't work, right? I think I need some kind of special character so it knows the wildcard is... (3 Replies)
Discussion started by: LordJezo
3 Replies