The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Assigning values to an array via for/while loop fiori_musicali Shell Programming and Scripting 2 11-24-2008 11:01 PM
Assigning the values to an Array kkraja Shell Programming and Scripting 1 08-11-2008 07:28 AM
string manipulating psalas UNIX for Dummies Questions & Answers 9 04-15-2008 11:00 AM
assigning values to a variable trichyselva UNIX for Dummies Questions & Answers 3 12-14-2007 01:55 AM
Assigning values to an array yongho UNIX for Dummies Questions & Answers 4 07-13-2005 09:49 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-17-2009
Anteus Anteus is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 54
Quote:
Originally Posted by vgersh99 View Post
If the fifth field starts with an upper case letter, return the value of the ninth field, otherwise return the value of the eight field.

i don't see why not - would not hurt to try it.


Tried

but its showing error
awk: There is an extra ) character.
The source line is 4.
The error context is
command=($5 ~ /^[A-Z]/)? >>> $9:$8) <<<
syntax error The source line is 4.
awk: The statement cannot be correctly parsed.
The source line is 4.
awk: There is a missing } character.
awk: There is an extra ) character.
  #2 (permalink)  
Old 06-17-2009
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,122
Quote:
Originally Posted by Anteus View Post
Tried

but its showing error
awk: There is an extra ) character.
The source line is 4.
The error context is
command=($5 ~ /^[A-Z]/)? >>> $9:$8) <<<
syntax error The source line is 4.
awk: The statement cannot be correctly parsed.
The source line is 4.
awk: There is a missing } character.
awk: There is an extra ) character.
then there must be an extra ')' from the copy/paste of the previous 'printf' posting. Tried to remove it?
What in the error message is not clear?
Reply

Bookmarks

Tags
awk, cut, for each, for loop

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 07:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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