The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to access values of awk/nawk variables outside the awk/nawk block? saniya Shell Programming and Scripting 5 05-13-2008 07:37 AM
nawk use ctap UNIX for Advanced & Expert Users 2 01-17-2008 06:45 AM
nawk -v to awk kamel.seg Shell Programming and Scripting 2 12-18-2007 07:30 AM
help with Awk or nawk Gerry405 UNIX for Dummies Questions & Answers 2 11-28-2005 01:00 PM
nawk whatisthis Shell Programming and Scripting 3 09-29-2004 01:44 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-01-2006
whatisthis's Avatar
whatisthis whatisthis is offline
Registered User
  
 

Join Date: Aug 2004
Posts: 175
nawk if within if condition

Hi,
I tried to use two if statement within one if statement in nawk and it keeps giving me the error message:
What did I go wrong here?

Thanks a lot!


#input file: qa2g:qa2_3:qa2,00380,1,Cat
#$1=qa2g:qa2_3:qa2
some=index($1,":")

if some != 0 {

if (split($1,label,) != 0 {
iterationposition=index(label(2),_)
if iterationposition != 0 {
iteration=substr(label(2),interationposition,2)
}
}
}
  #2 (permalink)  
Old 11-01-2006
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,116
pls do use vB Codes when posting sample data/code - it's impossible to see what you're trying to do.

What is IT that you're trying to do?
Give a sample input file and a desired result, pls - I don't understand what this code is doing/supposed to do.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:34 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0