Search Results

Search: Posts Made By: sars
22,256
Posted By sars
Resolved
Ya ,
i was able to pass the global variable to the function .
Sorry for that dumb question .
22,256
Posted By sars
Passing global variable to a function which is called by another function
Hi ,

I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3...
25,096
Posted By sars
Resolved
That worked !!!
thanks
25,096
Posted By sars
Using relational operators in case
Hi ,

I want to do the following:

i=6
case $i in
-lt 10)
echo Period=10
;;
-gt 10 && -lt 15)
echo Period-15
...
35,881
Posted By sars
Resolved
ok ..
i change the delimiter from "/" to "," (comma) .
It worked .
sars
35,881
Posted By sars
sed to display date in dd/mm/yyyy format
Hi

I have a sed command

sed -e "s/sub_date/=$(date +"%d/%m/%Y")/" sub_create_tmp


I want to substitute with the current date in dd/mm/yyyy format .
But the result is an error " cannot...
10,688
Posted By sars
Resolved
Thanks for that quick reply .
10,688
Posted By sars
Displaying fraction values after arithmetic division
Hi ,

I have the following line of code :

new=$(($old/300))

But if the value is less than 300 i get the answer as "0" .

How will i get the fraction values ?

sars
6,102
Posted By sars
rsh and sql
Hi reborg ..
a similar code to mine doesnt work :
vzs422:/in/tmp>su - linus rsh -l linus psmf 'sqlplus -s <<EOF
> select * from tab;
> exit;
> EOF'
OSF1
OSF1
End of linus's profile.
ksh:...
2,951
Posted By sars
rsh and sql query
Hi ...
I am doing a switch user and then rsh and then running a sql query .
I am successfull in rsh and logging into the database , but my query doesnt run ..
Here's the command :
su - linus -c...
3,038
Posted By sars
Resolved
Thanks Anbu ...
i got the output !!!
3,038
Posted By sars
using sed
Hi ...
I have a file saju-list with the following contents

Nidesh:25
Dinto:26
Johnson:28

I want to write a script to display the output like this :

NAME Nidesh
25
NAME Dinto
26
NAME...
69,271
Posted By sars
How to change the font colour in unix ?
Could you pls tell me how to change the font colour in unix ?
What is the syntax ?
12,115
Posted By sars
it doesnt work
Nops....
it doesnt work .
12,115
Posted By sars
command for CPU online/offline status in bash shell
Hi ,

How do i check that the CPU is online/offline in a multi CPU machine in Linux ?
i tired /proc/cpuinfo
dmesg
nothing gave me the currect CPU status.
Pls help !!
2,397
Posted By sars
it worked !!!
it worked ..thanks..
2,397
Posted By sars
one more change
I change my increment statement like this .

a=$(($a+1))

But still it is not working .
2,397
Posted By sars
variable in a for loop[Resolved]
Hi...
i am trying to ping my servers .The hostnames are present in a file .They are separated by spaces in the file .
i am doing the following :


a=1
for name in $(cat host2 |cut -d" "...
27,008
Posted By sars
read the ENTER key
Hi ,

I do the following :

]echo "Do you want to say yes or no ?(y/n)[n]:\c"
read ans

here 'n' is the default value.that means if the user press ENTER key then it should be 'n' .
Now how do...
Showing results 1 to 19 of 19

 
All times are GMT -4. The time now is 07:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy