Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Knowledge
# 1  
Old 08-18-2009

Can somebody explain me the following part within a awk command:

awk '{for(i=1;i<=NF;i++) if ($i=="mm")c++}

Can somebody please explain me the part (i=1;i<=NF;i++) ????SmilieSmilieSmilieSmilie
# 2  
Old 08-18-2009
It's a loop control fragment. it says start with i equal one and continue until i is less than or equal to the number of fields in the current input line (NF). Increment i after every execution of the command after the closing )....
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Practice using Unix and lack of knowledge

So I have a Networking class at my university that involves learning the basic commands of unix (i.e. Chmod, cat, cp, ls, mv, rm, mkdir, rmdir, pwd, etc) and my professor had us download and install Solaris and PuTTY as a means of...I suppose practicing using/executing commands. However due to... (7 Replies)
Discussion started by: bo74
7 Replies

2. Shell Programming and Scripting

programming knowledge

Hi Friends, I know very well the basic commands of Unix but i want to concentrate on unix shell programming can you please how to learn and suggest me how to become comfortable level. Thanks in advance (1 Reply)
Discussion started by: victory
1 Replies

3. Linux

Anyone with Blitz PHP knowledge

Blitz PHP I am having trouble installing Blitz PHP blitz-0.6.10.tar.gz Here is what i did: cd /tmp wget blitz-0.6.10.tar.gz tar zxfv blitz-0.6.10.tar.gz cd blitz-0.6.10 And then I tried ./configure Output: -bash: No such file in directory make Output: No targets in the... (1 Reply)
Discussion started by: kendel
1 Replies

4. AIX


Dear All Kindly provide me with a difference between hdiskpower and hdisk regards (2 Replies)
Discussion started by: magasem
2 Replies

5. UNIX for Dummies Questions & Answers

How to get the knowledge in UNIX? Suggest me . Please.

Hai, friends. In one exam which i have to attend in the month of january, they asked "knowledge of c and unix are required" . I am beginner to unix, even i dont know from where to start . Please suggest me what to do , to get through the exam and interview. I have already downloaded... (2 Replies)
Discussion started by: nani_ynm
2 Replies

6. UNIX for Dummies Questions & Answers

unix knowledge

I am a new Unix user looking for ways, other than time, to become an effective unix administrator. All sugestions welcome. Thanks (10 Replies)
Discussion started by: dtooth71
10 Replies

7. IP Networking

Any knowledge for sysctl?

HI folks. I am developing a protocol and I need to bind to an IP address that is not configured to my machine. The problem is with bind(). The sysctl system call seamed to overcome the problem of bind if you set the proc/sys/net/ipv4/ip_nonlocal_bind flag. Although I tryed to set the flag either... (7 Replies)
Discussion started by: developer
7 Replies
Login or Register to Ask a Question