05-27-2013
Hi agama...
No, I hadn't even thought about an array but I tried your code and now it is near instant...
(Macbook Pro, 13", circa August 2012, default is bash.)
This has helped me no-end and now I have to apply it to the frequency counter...
When it is inside the frequency counter code you will be mentioned...
If I couldn't find an alternative to my original code then I WAS going to spawn a child process and pass the results back to the parent code in its own time...
Many, many thanks...
@ Don...
Using ksh and your snippet shaved 6.5 seconds off of my original code...
@ alister...
Thanks for the heads up I will take careful note although I am sure Corona688 mentioned this problem to me some time ago...
Thanks to all for your time...
Bazza...
Last edited by wisecracker; 05-27-2013 at 05:56 AM..
Reason: Typos...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a korn shell string variable
str1 = "A,B,Z"
I would like to create another korn shell string variable
str2 = "letter = 'A' or letter = 'B' or letter = 'Z' "
Please help!
Thanks in advance
an UNIX newbie! (13 Replies)
Discussion started by: hai1973
13 Replies
2. Shell Programming and Scripting
Hey Guys,
Right i know how to alter a word to begin with a capital letter, i know how to remove unwanted characters and replace them with the relevant character however i don't now if there is a way to do them all in one line.
Code:
echo -n ${string:0:1} | tr a-z A-Z #convert first letter... (4 Replies)
Discussion started by: shadow0001
4 Replies
3. Shell Programming and Scripting
i have a file that contains a pattern like this:
ajay 1234 newyork available
kumar 2345 denver
singh 2345 newyork
ajay 3456 denver
kumar 3456 newyork
singh 3456 delhi available
ajay 4567 miami
kumar 4567 miami
singh 4567 delhi
i want to search for each line... (5 Replies)
Discussion started by: ajay41aj
5 Replies
4. Shell Programming and Scripting
if I have two string variable, how do I add one to anther.
like
a= "a"
b="b"
c=$a+$b
but that doesn't work.
Is there anyway to solve it.http://www.qtl.co.il/img/copy.pnghttp://www.google.com/favicon.icohttp://www.babylon.com/favicon.icohttp://www.morfix.com/favicon.ico (2 Replies)
Discussion started by: programAngel
2 Replies
5. Shell Programming and Scripting
Hi Guru's,
I need some help with data manipulation using shell scripting. I know how to replace the whole string but not part of the string.
The value after aa= should be replaced with the value in the mail leaving ,OU=111,OU=222,DC=333 as is. Below are the inputs and expected outputs.
Input:... (17 Replies)
Discussion started by: Samingla
17 Replies
6. Shell Programming and Scripting
Hi,
I have the followoing details in one file:
opt/tra/domain/test/new/filename1
training/ear/help
I need to manipulate the string in the following manner:
filename1= opt/tra/domain/test/new/filename1
help=training/ear/help
last string is the name and equal sign and then... (2 Replies)
Discussion started by: ckchelladurai
2 Replies
7. Shell Programming and Scripting
i have something like this...
echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }'
Certifica
the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it.
expected output is
Certificate (7 Replies)
Discussion started by: vivek d r
7 Replies
8. Shell Programming and Scripting
Hi ,
I am getting a string like
aaa,bbb,sdsdad,sdfsdf,sdfsdfdsf,rtyrtyr,45654654,ddfdfdfgdfg,dfgdfgdg...........
Now what I need is to format it.
So after each nth comma I need one newline. So the above will look like
when n=3
aaa,bbb,sdsdad,
sdfsdf,sdfsdfdsf,rtyrtyr,... (4 Replies)
Discussion started by: Anupam_Halder
4 Replies
9. Shell Programming and Scripting
I'm making a little game in Perl, and I am trying to remove the first instance of a character in an arbitrary string. For example, if the string is
"cupcakes"and the user enters another string that contains letters from "cupcake" e.g:
"sake"the original string will now look like this (below)... (3 Replies)
Discussion started by: whyte_rhyno
3 Replies
10. OS X (Apple)
i have a string that am looking to extract all characters following 3 consecutiv numbers.
Example my string is J1705PEAN038TDMN, i need to get TDMN
My string can have multiple 3 consecutive numbers, i need what follows last occurance (9 Replies)
Discussion started by: gigagigosu
9 Replies
LEARN ABOUT FREEBSD
i8254
ATTIMER(4) BSD Kernel Interfaces Manual ATTIMER(4)
NAME
attimer -- i8254 Programmable Interval Timer (AT Timer) driver
SYNOPSIS
This driver is a mandatory part of x86 kernels.
The following tunables are settable from the loader(8):
hint.attimer.X.clock
controls support for the event timer functionality. Setting this value to 0 disables it. The default value is 1.
hint.attimer.X.timecounter
controls support for the time counter functionality. Setting this value to 0 disables it. The default value is 1.
hw.i8254.freq
allows overriding the default counter frequency. The same value is also available at run-time via the machdep.i8254_freq sysctl.
DESCRIPTION
This driver uses i8254 Programmable Interval Timer (AT Timer) hardware to supply the kernel with one timecounter and one event timer, and to
generate sound tones for the system speaker. This hardware includes three channels. Each channel includes a 16 bit counter which decreases
with a known, platform-dependent frequency. Counters can operate in several different modes, including periodic and one-shot. The output of
each channel has platform-defined wiring: one channel is wired to the interrupt controller and may be used as event timer, one channel is
wired to the speaker and used to generate sound tones, and one timer is reserved for platform purposes.
The attimer driver uses a single hardware channel to provide both time counter and event timer functionality. To make this possible, the
respective counter must be running in periodic mode. As a result, the one-shot event timer mode is supported only when time counter func-
tionality is disabled.
The event timer provided by the driver is irrelevant to CPU power states.
SEE ALSO
apic(4), atrtc(4), eventtimers(4), hpet(4), timecounters(4)
BSD
May 26, 2014 BSD