11-25-2008
What if the record's first field is "Event:number" and i want to check only for number match (neglecting Event word) against number file.
10 More Discussions You Might Find Interesting
1. Programming
Hi,
I am currently trying to generate multiple random numbers in C for different variable:-
die1=1+(rand()%5);
die2=1+(rand()%5);
die3=1+(rand()%5);
die4=1+(rand()%5);
But I need to contrain the total of die1, die2,die3 and die4 to be 5 as well. If i insert die1+die2+die3+die4=5, i do... (6 Replies)
Discussion started by: ahjiefreak
6 Replies
2. Shell Programming and Scripting
I'm declaring a variable within a Korn shell to represent the total number of records in a SAS dataset and could use a little help with the syntax. This is what I have thus far:
#!/usr/bin/ksh
RecCount = `sas -x "select count(*) from /users/abc/123/sas_dataset.sas7bdat"` (2 Replies)
Discussion started by: sasaliasim
2 Replies
3. Shell Programming and Scripting
Howdy experts,
We have some ranges of number which belongs to particual group as below.
GroupNo StartRange EndRange
Group0125 935300 935399
Group2006 935400 935476
937430 937459
Group0324 935477 935549
... (6 Replies)
Discussion started by: thepurple
6 Replies
4. Shell Programming and Scripting
I have a file which has about 10000 records and I need to delete about 50 records from the file. I know line numbers and am using
sed '134,1357,......d' filename > new file.
It does not seem to be working.
Please Advice (5 Replies)
Discussion started by: mad_man12
5 Replies
5. Shell Programming and Scripting
I have to take a list of numbers from the keyboard and not by passing arguments. How will I read a set of numbers in such a way that I can use any number I wish to operate upon. Is there any specific command to do so. As said before I dont want to pass the numbers as arguments from command line.... (3 Replies)
Discussion started by: VishBoy
3 Replies
6. Shell Programming and Scripting
Hello All,
I am having problem to find what is the smallest number from 90% of highest numbers from all numbers in file. I am having file with thousands of lines and hundreds of columns.
I am familiar mainly with bash but I am open to whatever suggestion witch will lead to the solutions.
If I... (11 Replies)
Discussion started by: Apfik
11 Replies
7. Shell Programming and Scripting
hello every one
I have file with following records
begin
ASX120016719
ASX190006729
ASX153406729
ASX190406759
ASX180006739
end
for each record there is ASX word then 9 digits after it (NO spaces included)
what i want is to :
1- skip ASX
2-skip first 2 digits after ASX word... (16 Replies)
Discussion started by: neemoze
16 Replies
8. UNIX for Dummies Questions & Answers
##### (0 Replies)
Discussion started by: lucasvs
0 Replies
9. Shell Programming and Scripting
Hi,
i have a file, where measurement-data is stored in the first column. The file has also a header of 5 lines. I want to set counting up numbers in front of any particular measurement-value; should start at the 6. line with starting number 1.
i try to solve it with ...
awk 'NR > 6 { print... (6 Replies)
Discussion started by: IMPe
6 Replies
10. UNIX for Beginners Questions & Answers
Hi!
I found and then adapt the code for my pipeline...
awk -F"," -vOFS="," '{printf "%0.2f %0.f\n",$2,$4}' xxx > yyy
I add -F"," -vOFS="," (for input and output as csv file) and I change the columns and the number of decimal...
It works but I have also some problems... here my columns
... (7 Replies)
Discussion started by: echo manolis
7 Replies
LEARN ABOUT SUSE
sdl::event
SDL::Event(3) User Contributed Perl Documentation SDL::Event(3)
NAME
SDL::Event - a SDL perl extension
SYNOPSIS
use SDL::Event;
my $event = new SDL::Event; # create a new event
$event->pump(); # pump all events from SDL Event Queue
$event->poll(); # Get the top one from the queue
while ($event->wait()) {
my $type = $event->type(); # get event type
# ... handle event
exit if $type == SDL_QUIT;
}
DESCRIPTION
"SDL::Event" offers an object-oriented approach to SDL events. By creating an instance of SDL::Event via new() you can wait for events, and
then determine the type of the event and take an appropriate action.
EXAMPLE
Here is an example of a simple event handler loop routine. See also SDL::App::loop.
sub loop {
my ($self,$href) = @_;
my $event = new SDL::Event;
while ( $event->wait() ) {
# ... insert here your event handling like:
if ( ref($$href{$event->type()}) eq "CODE" ) {
&{$$href{$event->type()}}($event);
$self->sync();
}
}
}
METHODS
new()
Create a new event object.
type()
Returns the type of the event, see list of exported symbols for which are available.
pump()
poll()
wait()
Waits for an event end returns then. Always returns true.
set( type, state )
Set the state for all events of the given event's type
set_unicode( toggle )
Toggle unicode on the event.
set_key_repeat( delay, interval)
Sets the delay and intervall of the key repeat rate (e.g. when a user holds down a key on the keyboard).
active_gain()
active_state()
key_state()
key_sym()
key_name()
key_mod()
key_unicode()
key_scancode()
motion_state()
motion_x()
Returns the motion of the mouse in X direction as an absolute value.
motion_y()
Returns the motion of the mouse in Y direction as an absolute value.
motion_xrel()
Returns the motion of the mouse in X direction as a relative value.
motion_yrel()
Returns the motion of the mouse in Y direction as a relative value.
button_state()
Returns the state of the mouse buttons.
button_x()
button_y()
button()
AUTHOR
David J. Goehrig Documentation by Tels <http://bloodgate.com/>
SEE ALSO
perl SDL::App
perl v5.12.1 2010-07-05 SDL::Event(3)