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 > 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
AWK substitution klut Shell Programming and Scripting 4 01-15-2008 11:26 AM
Bad Substitution D_Redd74 Shell Programming and Scripting 3 02-07-2007 05:48 PM
ksh substitution solea Shell Programming and Scripting 2 08-09-2004 05:30 AM
sed substitution jo_aze UNIX for Dummies Questions & Answers 3 06-23-2002 09:32 PM
substitution supercbw Shell Programming and Scripting 1 06-07-2002 03:07 PM

 
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 Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-03-2008
daytripper1021 daytripper1021 is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 12
Question help with awk substitution

Hi again.

A have a CSV-file in the following format:

2008.09.01,15:17:42,9227096485,9233175320,CTC10,SMS,0901151742098314,Target_MSIS
DN_is_blacklisted


I want to have an awk command that will say:

If the first 3 digits of $4 does not begin with 922 or 923, then make $8 say "Invalid subscriber."

Is this possible in one awk line?

Hope to hear from you.

Thanks in advance.

 

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 08:08 AM.


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