PROBLEM: My inputfiles contain >50 million lines, so the awk command is too slow (it takes >2 minutes and I have thousands of inputfiles). Is there a way to make it faster? I have been told that it would be faster if I use Perl.
Last edited by Scrutinizer; 07-04-2012 at 04:46 PM..
Reason: code tags also for data sample
If I just wanted to get andred08 from the following ldap dn
would I be best to use AWK or CUT?
uid=andred08,ou=People,o=example,dc=com
It doesn't make a difference if it's just one ldap search I am getting it from but when there's a couple of hundred people in the group that retruns all... (10 Replies)
I am processing some terabytes of information on a computer having 8 processors (each with 4 cores) with a 16GB RAM and 5TB hard drive implemented as a RAID. The processing doesn't seem to be blazingly fast perhaps because of the IO limitation.
I am basically running a perl script to read some... (13 Replies)
Hi -- I have the following SQL query in my UNIX shell script -- but the subquery in the second section is very slow. I know there must be a way to do this with a union or something which would be better. Can anyone offer an alternative to this query? Thanks.
select
count(*)
from
... (2 Replies)
Hi,
I have a script below for extracting xml from a file.
for i in *.txt
do
echo $i
awk '/<.*/ , /.*<\/.*>/' "$i" | tr -d '\n'
echo -ne '\n'
done
.
I read about using multi threading to speed up the script.
I do not know much about it but read it on this forum.
Is it a... (21 Replies)
Can someone help me edit the below script to make it run faster?
Shell: bash
OS: Linux Red Hat
The point of the script is to grab entire chunks of information that concerns the service "MEMORY_CHECK".
For each chunk, the beginning starts with "service {", and ends with "}".
I should... (15 Replies)
awk "/May 23, 2012 /,0" /var/tmp/datafile
the above command pulls out information in the datafile. the information it pulls is from the date specified to the end of the file.
now, how can i make this faster if the datafile is huge? even if it wasn't huge, i feel there's a better/faster way to... (8 Replies)
I have the below command which is referring a large file and it is taking 3 hours to run. Can something be done to make this command faster.
awk -F ',' '{OFS=","}{ if ($13 == "9999") print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12 }' ${NLAP_TEMP}/hist1.out|sort -T ${NLAP_TEMP} |uniq>... (13 Replies)
I have nginx web server logs with all requests that were made and I'm filtering them by date and time.
Each line has the following structure:
127.0.0.1 - xyz.com GET 123.ts HTTP/1.1 (200) 0.000 s 3182 CoreMedia/1.0.0.15F79 (iPhone; U; CPU OS 11_4 like Mac OS X; pt_br)
These text files are... (21 Replies)
Discussion started by: brenoasrm
21 Replies
LEARN ABOUT SUSE
sdl::opengl
SDL::OpenGL(3) User Contributed Perl Documentation SDL::OpenGL(3)NAME
SDL::OpenGL - a perl extension
DESCRIPTION
SDL::OpenGL is a perl module which when used by your application exports the gl* and glu* functions into your application's primary
namespace. Most of the functions described in the OpenGL 1.3 specification are currently supported in this fashion. As the implementation
of the OpenGL bindings that comes with SDL_perl is largely type agnositic, there is no need to decline the function names in the fashion
that is done in the C API. For example, glVertex3d is simply glVertex, and perl just does the right thing with regards to types.
CAVEATS
The following methods work different in Perl than in C:
glCallLists
glCallLists(@array_of_numbers);
Unlike the C function, which get's passed a count, a type and a list of numbers, the Perl equivalent only takes a list of numbers.
Note that this is slow, since it needs to allocate memory and construct a list of numbers from the given scalars. For a faster version
see glCallListsString.
The following methods exist in addition to the normal OpenGL specification:
glCallListsString
glCallListsString($string);
Works like glCallLists(), except that it needs only one parameter, a scalar holding a string. The string is interpreted as a set of
bytes, and each of these will be passed to glCallLists as GL_BYTE. This is faster than glCallLists, so you might want to pack your data
like this:
my $lists = pack("C", @array_of_numbers);
And later use it like this:
glCallListsString($lists);
AUTHOR
David J. Goehrig
SEE ALSO
perl SDL::App
perl v5.12.1 2010-07-05 SDL::OpenGL(3)