Sponsored Content
Full Discussion: awk help needed
Top Forums Shell Programming and Scripting awk help needed Post 302547994 by raghavendra.nsn on Wednesday 17th of August 2011 07:54:13 AM
Old 08-17-2011
awk help needed

Hi,

i have input records as shown below.

HTML Code:
4097,Probe3,G10,255,05/17/2011 12:44:03:185,NULL,05/17/2011 12:39:03:180,05/17/2011 12:44:03:185,99,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,airtelgprs.com,NULL,NULL,NULL,NULL,NULL,NULL,223.191.39.40,NULL,NULL,9100019600296201,404929600299653,919004603064,NULL,65535,NULL,NULL,65535,NULL,NULL,NULL,NULL,4294967295,4294967295,4294967295,4294967295,NULL,3431717227,NULL,NULL,NULL,NULL,0,0,0,0,0,0,NULL,NULL,223.191.39.40,NULL,4294967295,NULL,4294967295,65535,1,65535,NULL,3431717227,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
4097,Probe3,G10,255,05/17/2011 12:44:03:185,16,05/17/2011 12:39:03:180,05/17/2011 12:39:03:197,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,airtelgprs.com,NULL,0,NULL,NULL,NULL,NULL,223.191.39.40,NULL,NULL,9100019600296201,404929600299653,919004603064,NULL,65535,NULL,NULL,65535,0,NULL,NULL,NULL,4294967295,4294967295,4294967295,4294967295,NULL,3431717227,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,223.191.39.40,NULL,4294967295,NULL,4294967295,65535,1,65535,NULL,3431717227,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,

now first field say 4093 needs to incremented with command line val variable say val is 3 then first field should be 4096.

and all other fields should remain same.

want to know how we can achive this with awk ?


Thanks in advance.

Raghav
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk help needed.

Dear All, I want to compare column 3 and column 4 of files(File1 and File2) and want to get the matched records in one file and rejected records in another file.I have tried an awk script,but as Iam not good in it,I cant able to continue.Can anyone help me in this one. File 1... (0 Replies)
Discussion started by: cskumar
0 Replies

2. Shell Programming and Scripting

awk help needed

I am trying to write a script that will parse out the e-mail address of a person from the name of a file in a directory. Example: filename is: /home/myname/first.middle.last@email.com.xls I want to extract just the email address and mail the file to that address. I want to send the... (6 Replies)
Discussion started by: Drenhead
6 Replies

3. Shell Programming and Scripting

awk help needed

How do I alter this command so that it prints only the second comma delimited field from line number 3? Secondly, how do you redirect the output to a variable called TEST? Thanks (cat BATCH007.TXT | awk 'BEGIN { FS = "," } ; {print $2 }') (5 Replies)
Discussion started by: ddurden7
5 Replies

4. Shell Programming and Scripting

help needed in awk

Hi , i have a file a.txt like this: far near veryfar toonear typeset var1=veryfar to extract the text between two strings i use the following command : awk '/far/,$veryfar/' a.txt its not working can nyone tell pls whats wrong in it ? i doubt can we use variable in awk like this... (3 Replies)
Discussion started by: santosh1234
3 Replies

5. UNIX for Dummies Questions & Answers

Awk help needed

I have a log file monitor script that checks through a log file for a string. I use awk to search the log file, starting at the last checked line, for the specified string and then output the count and the last row number checked. The part of the script that does all the work is here: set --... (6 Replies)
Discussion started by: mglenney
6 Replies

6. Shell Programming and Scripting

Awk Help needed

hi, I have input file woth records as shown below OCSMRC_OK,7057348733,+0.00,0,18/05/2010 23:42:19,BellMobility,302610000918553,0006056099,B30,686505,686505,OCS_MRC,+49.14,0,0 ,0,0, OCSPPKB_NOK,4163460120,+1.25,0,18/05/2010... (4 Replies)
Discussion started by: raghavendra.cse
4 Replies

7. UNIX for Dummies Questions & Answers

help needed for awk

Dear all, I am new to use unix. I run the following command and got the error. Anyone knows how should I modify the command. Thanks a lot! $ for chr in 'seq 1 23'; do awk 'BEGIN {print "T","pheno";}{print "M",$2}' out_${chr}.map > dat_${chr}.dat; done error message:... (2 Replies)
Discussion started by: forevertl
2 Replies

8. Shell Programming and Scripting

awk help needed

Hi Experts, I have a file (file 1) with several columns and I need to create 2 files based on the data of 20th column of file 1. Criteria 1 : If the 20th field of file1 is empty , copy the entire records to file 2. I am successfully able to do this with the following awk code : awk... (2 Replies)
Discussion started by: nua7
2 Replies

9. Shell Programming and Scripting

awk help needed

Hi Everyone, i have following in my file 1 2 3 4 5 6 . . 100 and now i want the output as 1 4 7 ..........so on..............97 100 (10 Replies)
Discussion started by: zozoo
10 Replies

10. Shell Programming and Scripting

awk - help needed please

Hi.. have a file as below, appreciate if someone can help on this 143|500| 10| 23353 22131 23355 23354 23358 23352 23357 23350 23349 23351| RAID5 213|1008| 9| 22419 22412 221 22413 22414 22416 22417 22415 22418| RAID6 1088|500| 5| 22243 22240 22244 22242 22241| RAID5 322|1200| 12|... (6 Replies)
Discussion started by: richard0@rediff
6 Replies
XmManager(3)							  LessTif Manuals						      XmManager(3)

NAME
XmManager - Motif-compatible window-manager widget SYNOPSIS
#include <Xm/Manager.h> XmManager XmCreateManager DESCRIPTION
XmManager X RESOURCES
Name Class Type Default Access ----------------------------------------------------------------------------------------- XmNunitType XmCUnitType UnitType NULL CSG XmNx XmCPosition HorizontalPosition NULL CSG XmNy XmCPosition VerticalPosition NULL CSG XmNwidth XmCDimension HorizontalDimension NULL CSG XmNheight XmCDimension VerticalDimension NULL CSG XmNborderWidth XmCBorderWidth HorizontalDimension NULL CSG XmNforeground XmCForeground Pixel NULL CSG XmNbackground XmCBackground Pixel NULL CSG XmNbackgroundPixmap XmCPixmap XmBackgroundPixmap NULL CSG XmNhighlightColor XmCHighlightColor Pixel NULL CSG XmNhighlightPixmap XmCHighlightPixmap ManHighlightPixmap NULL CSG XmNnavigationType XmCNavigationType NavigationType NULL CSG XmNshadowThickness XmCShadowThickness HorizontalDimension NULL CSG XmNtopShadowColor XmCTopShadowColor Pixel NULL CSG XmNtopShadowPixmap XmCTopShadowPixmap ManTopShadowPixmap NULL CSG XmNbottomShadowColor XmCBottomShadowColor Pixel NULL CSG XmNbottomShadowPixmap XmCBottomShadowPixmap ManBottomShadowPixmap NULL CSG XmNhelpCallback XmCCallback Callback NULL CSG XmNuserData XmCUserData Pointer NULL CSG XmNtraversalOn XmCTraversalOn Boolean NULL CSG XmNstringDirection XmCStringDirection StringDirection NULL CSG XmNinitialFocus XmCInitialFocus Widget NULL CSG XmNunitType XmNx XmNy XmNwidth XmNheight XmNborderWidth XmNforeground XmNbackground XmNbackgroundPixmap XmNhighlightColor XmNhighlightPixmap XmNnavigationType XmNshadowThickness XmNtopShadowColor XmNtopShadowPixmap XmNbottomShadowColor XmNbottomShadowPixmap XmNhelpCallback XmNuserData XmNtraversalOn XmNstringDirection XmNinitialFocus CLASS HIERARCHY
Object(3) Rect(3) UnNamedObj(3) Core(3) Composite(3) Constraint(3) XmManager(3) CALLBACKS
CONVENIENCE FUNCTIONS
SEE ALSO
LessTif Project April 1998 XmManager(3)
All times are GMT -4. The time now is 03:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy