Search Results

Search: Posts Made By: rafazz
1,701
Posted By rafazz
Sorry for delay! I was trying to sort this out....
Sorry for delay! I was trying to sort this out. The output is the following:


list=`cat /etc/oratab | grep "/home/ora/app/oracle/product/e.11.2.0.1.0" | cut -f 1 -d :`;


Output:
INS4
INS2...
1,701
Posted By rafazz
Thanks for your help. The suggested code is...
Thanks for your help. The suggested code is returning results which are not true unfortunately :(

I cannot use the arrays for comparing? I need to be as inlinescript to call it via command line.
1,701
Posted By rafazz
Hi Rudic. Thanks for your reply. I have edit the...
Hi Rudic. Thanks for your reply. I have edit the case with samples.
I have two arrays for example arrayA and array B. How can I compare the results?

arrayA = (item1)
array B = (item1 item2...
1,701
Posted By rafazz
Comparison between two arrays
Hello,

I am trying to compare two arrays and return common values. The purpose is to find running databases oracle running on the atually operating system. I have found a way to do it but it takes...
Forum: Programming 05-16-2010
3,123
Posted By rafazz
How to invert order in QuickSort
Hello! Iam trying to reverse my order of quicksort in C from asc order (1-99) that is the original way of the algoritm, to descending (99-1). I've tried so many ways that iam a kind of lost now!:s
...
1,626
Posted By rafazz
Thanks thanks thanks!! It works=))))
Thanks thanks thanks!! It works=))))
1,626
Posted By rafazz
it works with gawk. Higher works fine but...
it works with gawk.

Higher works fine but the lower shows me the header of my file:
tourID:name:buyin:buyout

how can i despite the first line?
1,626
Posted By rafazz
./v12.sh: line 369: nawk: command not found ...
./v12.sh: line 369: nawk: command not found


this is why?
1,626
Posted By rafazz
Calculate different between two columns and return high and lower value
In database.txt

tourID:name:buyin:buyout
0001:SundayMillion:210:1000000
0002:MondayMillion:115:114
0003:Tuesday:123:0
0004:Thrusday:12412:26
I want the outpout:

The higher value is...
12,360
Posted By rafazz
I have the select output: ...
I have the select output:

tourID:name:buyin:buyout
0001:SundayMillion:210:10000
0002:MondayMillion:115:232


I want the difference between $buyin and $buyout in absolute and return the high...
2,477
Posted By rafazz
program.sh source functions.sh ... if...
program.sh

source functions.sh
...

if exists "$name";then
move "$name"
else
echo "Error: name not here in $c"
fi

...



functions.sh


$c=1.txt
$v=2.txt
2,477
Posted By rafazz
if I wanna extract a certain line like the line...
if I wanna extract a certain line like the line with $name google. How can i do that?
2,477
Posted By rafazz
the $c is where the data is, like $c=file.txt. ...
the $c is where the data is, like $c=file.txt.

The third column is asked to the user, with a echo "add description" read description.

I dont know how I can add a third column in the line. I...
2,477
Posted By rafazz
Add new parameters into a line, and redirect the line to other file
How can i add new parameters into a line, and redirect the line to other file?

For example:
1.sh

name:owner
google:richard
youtube:student
I want a, for example 2.sh with:
...
2,099
Posted By rafazz
Lately, i was working with 2 files but i was...
Lately, i was working with 2 files but i was thinking and, why iam I working with 2 files??? Lets take to one file only.


aa:1000:0
bb:2000:1000
cc:3000:1500
dd:40003000
ee:5000:2000

...
2,099
Posted By rafazz
No. Iam only trying to calc easy my profit when I...
No. Iam only trying to calc easy my profit when I make bets online in bwin and I give the example of poker that is more easy to understand i think
2,099
Posted By rafazz
Poker: calc profit in tournaments
Imagine that you play poker and the file 1.txt is your buy-in, and in 2.txt is your gains. I want to know the tournament that have more proffit and less proffit.

1.txt
aa:1000
bb:2000
cc:3000...
4,918
Posted By rafazz
DONE!!!! Thanks :D ---------- Post updated...
DONE!!!! Thanks :D

---------- Post updated at 10:36 AM ---------- Previous update was at 10:34 AM ----------



Wow GREAT! I will use this for another porpose in my program :D thanks!
4,918
Posted By rafazz
ed $c <<EOF /^$name: s/No/Yes/ w q ...
ed $c <<EOF
/^$name:
s/No/Yes/
w
q


/v12.sh: line 439: warning: here-document at line 291 delimited by end-of-file (wanted `EOF')
/v12.sh: line 440: syntax error: unexpected end of file
4,918
Posted By rafazz
I dont want to give the cc from code. The cc must...
I dont want to give the cc from code. The cc must be a variable, like $name. If $name exists, then find the line that $name is and edit & save.
4,918
Posted By rafazz
the inputfile is the same that output. The file...
the inputfile is the same that output. The file will be rewritable. I wanna edit the line, change the Yes to No or No to Yes and save.

ResultNow: it find the name, changes but dont save the file.
4,918
Posted By rafazz
$c is the file $SEP is the separator - : I...
$c is the file
$SEP is the separator - :

I have the function exists to find the key.

exists() {
grep -i -q "^$1$SEP" "$c"
}

So the prog will be

if exists "$name"; then
<CODE HERE>...
4,918
Posted By rafazz
It dont work. I want to find the key, change the...
It dont work. I want to find the key, change the key in the file. The awk finds the key but dont change
4,918
Posted By rafazz
Find and change flag "Yes to No" or "No to Yes"
name:age:girlfriend
aa:11:yes
bb:22:yes
cc:33:no
dd:44:no
ee:55:yes

I want to change the cc, the status of girlfriend to yes.

Find cc, and then change! how can i do this?
4,081
Posted By rafazz
done! thanks :D another question.. to...
done! thanks :D

another question..

to calculate the min in the column is:

awk -F":" ' int($2)<s{s=$2;t=$1} END{printf "The max value is %s from %s.", s,t} ' file

is this correct? i only...
Showing results 1 to 25 of 30

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