for test reasons I tried the following two one-liners:
and
The file contains approx. 250k lines. awk does it in 0.15 secs (real), cut in 0.44. The user time has about the same relation, whereas the sys time is almost identical in both cases.
The fact that awk is almost 8 times larger than cut (in kB) seems to make no difference.
I am running RH 7.1 and i am always remotely logged in working on a database. I got php and mysql running and then as the each week goes my rsh, or secure telnet, and any other remote session slows to become extremly choppy. If i am at teh box my i am fine the computer is not bogged down at all,... (5 Replies)
Hi,
We have developed a server program using TCP/IP Communication to communicate with another client program. After running for some days we find the TCP/IP connection from the server program is getting slower ie, the messages are not send quickly to the client.
What i mean to say is since the... (0 Replies)
Hi,
We have developed a server program using TCP/IP Communication to communicate with another client program. After running for some days we find the TCP/IP connection from the server program is getting slower.
What i mean to say is since the send() function in the server program (it is... (2 Replies)
After my big disaster, I'm restoring from tape on my Sun box. This is the second time I've used 'ufsrestore' with this DEC TZ88 SCSI DLT drive. The last time was for a migration from one box to another. Both the last time and this time, the restore has taken a hell of a lot longer than the... (4 Replies)
Hi, I'm very new to scripting.
grep $s $filename | awk '{print $2}' | cut -c 1-8
How can I optimize this using a single awk?
I tried:
awk '/$s/ {print $2}' $filename | cut -c 1-8
However didn't work, I think the awk is not recognizing $s and the verbal is something else. (6 Replies)
i was trying to work on program to look for users never log on sever.. using awk
with awk is working
last| awk '{print $1}' |sort -u > /tmp/users1$$
cat /etc/passwd | awk -F: '{print $1}' |sort -u > /tmp/users2$$
comm -13 /tmp/users$$
rm -f /tmp/users$$
with cut it is not working
... (3 Replies)
how would i write a shell script to show the number of lines in which int variable appears in a c++ program.
how would i do this using cut or awk methods is it possbile and having a output similar to this
x, number of apperances =
y, number of apperances = (2 Replies)
Hello everyone, i'm having a problem compiling an application i'm developing.
For a month, while developing, i did lots of compilations to test it. While compiling, i noticed gcc did it pretty slow, but gave it no importance.
I'm using ubuntu 10.04 32bits, and my pc has:
- Dual core intel... (1 Reply)
Hi All,
We run Many jobs evryday using Autosys. Sometimes due to various reason we got to run the job from terminal as well (using nohup).
We observed that the job running through terminal(nohup) takes much less time then the autosys (for same job).
What can be the possible reason for such... (1 Reply)
Discussion started by: kg_gaurav
1 Replies
LEARN ABOUT SUSE
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)