Sponsored Content
Full Discussion: Usage of Int with NR in awk
Top Forums Shell Programming and Scripting Usage of Int with NR in awk Post 302912448 by blackrageous on Friday 8th of August 2014 10:36:27 AM
Old 08-08-2014
NR is you the total number of records being processed or line number
 

10 More Discussions You Might Find Interesting

1. Programming

difference between int ** func() and int *& func()

What is the difference between int** func() and int*& func(). Can you please explain it with suitable example. Thanks, Devesh. (1 Reply)
Discussion started by: devesh
1 Replies

2. UNIX for Dummies Questions & Answers

int open(const char *pathname, int flags, mode_t mode) doubt...

hello everybody! I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code: #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int main(){ int fileDescriptor; fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies

3. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

4. Shell Programming and Scripting

problem in awk int() function

awk -vwgt=$vWeight -vfac=$vFactor ' BEGIN { printf("wgt:" wgt "\n"); printf("factor:" fac "\n"); total = sprintf("%.0f", wgt * fac); total2 = sprintf("%.0f", int(wgt * fac)); printf("total:" total "\n"); printf("total2:" total2 "\n"); } ' if vWeight=326.4 vFactor=100 the result... (2 Replies)
Discussion started by: qa.bingo
2 Replies

5. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

6. Shell Programming and Scripting

Awk issue using int function

Hi, I am having issue with awk command . This command is running in the command prompt but inside a shell script. awk -F'| ' 'int($1)==$1 && int($3) ==$3' int_check.txt $cat int_check.txt 123|abc|123x 234|def|345 When i run it inside a shell script i am getting the error "bailing... (5 Replies)
Discussion started by: ashwin3086
5 Replies

7. Programming

Handle int listen(int sockfd, int backlog) in TCP

Hi, from the manual listen(2): listen for connections on socket - Linux man page It has a parameter called backlog and it limits the maximum length of queue of pending list. If I set backlog to 128, is it means no more than 128 packets can be handled by server? If I have three... (3 Replies)
Discussion started by: sehang
3 Replies

8. Shell Programming and Scripting

Advanced AWK Regexp substring to int & Replace

Hi! I have a difficult problem, to step up a unknown version number in a text file, and save the file. It would be great to run script.sh and the version gets increased. Example the content of the textfile.txt hello version = x bye This include three steps 1. First find the char after... (2 Replies)
Discussion started by: Beachboy72
2 Replies

9. Shell Programming and Scripting

Help with awk - Disk usage

Hi All, Would appreciate your help as to why the following code not showing the correct output. the issue is on the last else cause. I am trying to report on disk space based on percentage usage. for some reason, it's showing output as OK even thou disk space is 90% !!!! any ideas why? thanks!!... (2 Replies)
Discussion started by: xcod3r
2 Replies

10. Shell Programming and Scripting

awk usage

Hi I have a file like this user="joe" phone="4280919" duration=128 login=12/02/2016 ip-address=10.230.120.35 user="mary" phone="6352728" duration=23 login=16/02/2016 ip-address=10.123.231.54 I have to convert these to as follows (csv format) (Ignore Login field)... (6 Replies)
Discussion started by: Balav
6 Replies
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)
All times are GMT -4. The time now is 09:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy