06-14-2012
'( time ls > /dev/null ) > & timer.out' works perfectly.
I've been attempting to solve this problem for quite a while...thank you for your response.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi!,
My shell script takes a quite a long time to execute.. Nothing appears on the screen during this period.. User are left guessing... whats going on????????????
Any ideas on how to create a small timer script which print a word on screen say " wait.. Program running" after every 10 seconds... (3 Replies)
Discussion started by: jyotipg
3 Replies
2. Shell Programming and Scripting
Hi,
I am trying to do the following using AWK program.
1. Read the input data file
2. Parse the record and see if it contains errors
3. If the record contains errors, then write it into Reject file, else, write into usual output file or display it on the screen
Here is what I have done -... (6 Replies)
Discussion started by: vidyak
6 Replies
3. Shell Programming and Scripting
Hi All,
Please help me writing the below script.
I have two sql queries.
1. Select count(1),Client_id from TABLE_A group by Client_id;
2. Select count(1),Client_id from TABLE_B group by Client_id;
I need the output of above two sql queries in a single file. The output 2nd query should be... (4 Replies)
Discussion started by: 46019
4 Replies
4. Shell Programming and Scripting
Hi
I have developed bash script to connect to database and execute .sql files. I am logging some statements in to log file using echo. While logging I am adding the date in front of the log statements which makes sense. I am unable to add date in front of output from the sqlplus and sqlldr,... (8 Replies)
Discussion started by: murtymvvs
8 Replies
5. Shell Programming and Scripting
How do you set timer as output to the command line so that you get an output like
Has been waiting for 5 seconds
Has been waiting for 6 seconds
...
Where only the number changes. (2 Replies)
Discussion started by: locoroco
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have 1000 files names data1.txt through data1000.txt inside a folder. I want to write a script that will take each first line from the files and write them as output into a new file. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
7. Shell Programming and Scripting
Hi All,
I have an input file containing data as below:
Input.DAT
XXXXXXX|YYYYYYY|ZZZZZZZZZZ|12334446456|B|YY|111111111|111111111|111111111|111111111|15|3|NNNNNN|Y|3|AAA|111111111... (11 Replies)
Discussion started by: sagar.cumar
11 Replies
8. Shell Programming and Scripting
Hi
I am trying to write output to a file in columns
I have file in the follwoing:
# cat file
abc
def
#
I am trying to write next output as like
# cat file
abc 123
def 345
#
:mad: (6 Replies)
Discussion started by: Priya Amaresh
6 Replies
9. Shell Programming and Scripting
HI
I am trying to grep 3 characters from hostname and append a character at the end.
I tried as in the following:
root@abag3:~# hostname | cut -c1-3
hyu
Now I am trying to append "g" at the end of this output as in the following.
root@abag3:~# hostname | cut -c1-3 | sed -s... (4 Replies)
Discussion started by: Priya Amaresh
4 Replies
10. Shell Programming and Scripting
Hello,
I am having problem while redirecting output to a file where as on console output is proper.
for dir in */; do printf "%s, " "$dir"; ls -m "$dir"; echo; done > output.txt
Output of above command is coming in single line but when i am redirecting output to a file, single line i... (10 Replies)
Discussion started by: Manoj Rajput
10 Replies
LEARN ABOUT DEBIAN
prima::timer
pod::Prima::Timer(3) User Contributed Perl Documentation pod::Prima::Timer(3)
NAME
Prima::Timer - programmable periodical events
SYNOPSIS
my $timer = Prima::Timer-> create(
timeout => 1000, # milliseconds
onTick => sub {
print "tick!
";
},
);
$timer-> start;
DESCRIPTION
Prima::Timer arranges periodical notifications to be delivered in certain time intervals. The notifications are triggered by the system,
and are seen as "Tick" events. There can be many active Timer objects at one time, spawning events simultaneously.
USAGE
Prima::Timer is a descendant of Prima::Component. Objects of Prima::Timer class are created in standard fashion:
my $t = Prima::Timer-> create(
timeout => 1000,
onTick => sub { print "tick
"; },
);
$t-> start;
If no `owner` is given, $::application is assumed.
Timer objects are created in inactive state; no events are spawned. To start spawning events, <start()> method must be explicitly called.
Time interval value is assigned using the <::timeout> property in milliseconds.
When the system generates timer event, no callback is called immediately, - an event is pushed into stack instead, to be delivered during
next event loop. Therefore, timeout value is not held accurately, and events may take longer time to pass. More accurate timing scheme, as
well as timing with precision less than a millisecond, is not supported by the toolkit.
API
Properties
timeout MILLISECONDS
Manages time interval between "Tick" events. In set-mode call, if the timer is in active state ( see "get_active()", the new timeout
value is applied immediately.
Methods
get_active
Returns a boolean flag, whether object is in active state or not. In the active state "Tick" events are spawned after "::timeout" time
intervals.
get_handle
Returns a system-dependent handle of object
start
Sets object in active state. If succeed, or if the object is already in active state, returns 1. If the system was unable to create a
system timer instance, 0 is returned.
stop
Sets object in inactive state.
Events
Tick
A system generated event, spawned every "::timeout" milliseconds if object is in active state.
AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>.
SEE ALSO
Prima, Prima::Object
perl v5.14.2 2009-02-24 pod::Prima::Timer(3)