Sponsored Content
Full Discussion: grep out and fix a section
Top Forums Shell Programming and Scripting grep out and fix a section Post 302533106 by richsark on Wednesday 22nd of June 2011 05:52:46 PM
Old 06-22-2011
Hi Mirni,

I suspected that, I did run it as
Code:
$ awk '{if(length($9)!=12) $9="000000000000"; print}'10_82_150_13.netsh
awk: {if(length($9)!=12) $9="000000000000"; print}10_82_150_13.netsh
awk:                                                          ^ syntax error

and:
Code:
$ awk '{if(length($9)!=12) $9="000000000000"; print}' 10_82_150_13.netsh
Aborted (core dumped)

Code:
$ less gawk.exe.stackdump
Stack trace:
Frame     Function  Args
0028C3E4  769B1194  (00000120, 0000EA60, 00000000, 0028C508)
0028C3F8  769B1148  (00000120, 0000EA60, 000000A4, 0028C4EC)
0028C508  610C92FA  (00000000, 00000120, 0028C528, 00000000)
0028C5E8  610C6057  (00000000, 00000000, 00000000, 00000000)
0028C638  610C643C  (00001BC4, 0028C660, 0028C6F0, 610926C9)
0028C6F8  610C6551  (00001BC4, 00000006, 0028C728, 610C65F5)
0028C708  610C658C  (00000006, 0028CE80, 00000000, 00000000)
0028C728  610C65F5  (00000000, 00000000, 00000000, 00000000)
0028C798  610F52DD  (00B65760, FFFFFFFF, 00000000, 00000000)
0028C7E8  0041C184  (00000000, 00000000, 00010000, 00B655D0)
0028C828  00413E24  (00B656E8, 0000000A, 0028CC48, 610024E2)
0028C988  00436EDD  (00B656E8, 00000000, 0028C9D8, 00000000)
0028CAE8  00436E91  (00B65738, 0028FF40, 00B7DB98, 61073E66)
0028CC48  00436DC0  (00B654E0, 00000000, 0028CD28, 00425B91)
0028CC58  00423AD8  (00B65A10, 00445716, 00000000, 00446220)
0028CD28  00425B91  (00000000, 00000000, 0028CD68, 61007038)
End of stack trace (more stack frames may be present)
gawk.exe.stackdump (END)


Last edited by Franklin52; 06-23-2011 at 03:45 AM.. Reason: Please use code tags
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

New section

What are the chances of possibly posting some of the more common how-to type stuff for the newbies so we can avoid the repititious stuff that appears every other day? Not so much like a Q&A forum, but more like a reference area for the mundane stuff. Beyond searching the forum, I think people... (3 Replies)
Discussion started by: ober5861
3 Replies

2. Post Here to Contact Site Administrators and Moderators

New Section

Just like we have a section "Unix for dummies..." , why not have a section on UNIX BACKUP AND RECOVERY Thanks :) (3 Replies)
Discussion started by: kapilv
3 Replies

3. UNIX for Dummies Questions & Answers

how can i extract text section via grep

hi, i have a very long text file. i need to extract with grep command a certain part. for example text file include 1ooo rows: 1.... 2... 3... . . . 1000 i want to view with grep only rows 50-100. any ideas will be appreciated thanks... (8 Replies)
Discussion started by: meny
8 Replies

4. Shell Programming and Scripting

Extract section of file based on word in section

I have a list of Servers in no particular order as follows: virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection). 9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
Discussion started by: jelloir
2 Replies

5. Shell Programming and Scripting

Prepend first line of section to each line until the next section header

I have searched in a variety of ways in a variety of places but have come up empty. I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
Discussion started by: pagrus
7 Replies

6. Shell Programming and Scripting

Grep or print each section of a file on one line with a separator

I can obtain information from itdt inventory command however it display as below, I'd like to print each entity on one line but seperated by : the file is something like and each section ends with Volume Tag Drive Address 256 Drive State ................... Normal ASC/ASCQ... (3 Replies)
Discussion started by: gefa
3 Replies

7. Shell Programming and Scripting

Grep text and see all section

Hello I am looking for a way to look in files and to grep text and see the all section of the text ! Sharon123 deed 10000 class 360 ! sharon456 2000 deed ! Sharon789 live 3000 ! To grep "deed "an see the all section (5 Replies)
Discussion started by: sharong
5 Replies

8. Shell Programming and Scripting

How to Grep of by section?

I have a script that outputs this as a file John Smith ---------------- memberOf: example1;sampletest;test memberOf: example2;sampletest;test memberOf: example3;sampletest;test memberOf: example4;sampletest;test A Member of 4 Groups Sally Smith ---------------- memberOf:... (4 Replies)
Discussion started by: ajetangay
4 Replies

9. UNIX for Beginners Questions & Answers

Grep a section from an UNIX file obtaining only part of the data

Hello, I have a log file that has several sections "BEGIN JOB, End of job" like in the following example: 19/06/12 - 16:00:57 (27787398-449294): BEGIN JOB j1(27787398-449294) JOB1 19/06/12 - 16:00:57 (27787398-449294): DIGIT: 0 number of present logs : 1 19/06/12 - 16:00:57... (4 Replies)
Discussion started by: mvalonso
4 Replies
UTF8(5) 						      BSD File Formats Manual							   UTF8(5)

NAME
utf8 -- UTF-8, a transformation format of ISO 10646 SYNOPSIS
ENCODING "UTF-8" DESCRIPTION
The UTF-8 encoding represents UCS-4 characters as a sequence of octets, using between 1 and 6 for each character. It is backwards compatible with ASCII, so 0x00-0x7f refer to the ASCII character set. The multibyte encoding of non-ASCII characters consist entirely of bytes whose high order bit is set. The actual encoding is represented by the following table: [0x00000000 - 0x0000007f] [00000000.0bbbbbbb] -> 0bbbbbbb [0x00000080 - 0x000007ff] [00000bbb.bbbbbbbb] -> 110bbbbb, 10bbbbbb [0x00000800 - 0x0000ffff] [bbbbbbbb.bbbbbbbb] -> 1110bbbb, 10bbbbbb, 10bbbbbb [0x00010000 - 0x001fffff] [00000000.000bbbbb.bbbbbbbb.bbbbbbbb] -> 11110bbb, 10bbbbbb, 10bbbbbb, 10bbbbbb [0x00200000 - 0x03ffffff] [000000bb.bbbbbbbb.bbbbbbbb.bbbbbbbb] -> 111110bb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb [0x04000000 - 0x7fffffff] [0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb] -> 1111110b, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb If more than a single representation of a value exists (for example, 0x00; 0xC0 0x80; 0xE0 0x80 0x80) the shortest representation is always used. Longer ones are detected as an error as they pose a potential security risk, and destroy the 1:1 character:octet sequence mapping. SEE ALSO
euc(5) Rob Pike and Ken Thompson, "Hello World", Proceedings of the Winter 1993 USENIX Technical Conference, USENIX Association, January 1993. F. Yergeau, UTF-8, a transformation format of ISO 10646, January 1998, RFC 2279. The Unicode Standard, Version 3.0, The Unicode Consortium, 2000, as amended by the Unicode Standard Annex #27: Unicode 3.1 and by the Unicode Standard Annex #28: Unicode 3.2. STANDARDS
The utf8 encoding is compatible with RFC 2279 and Unicode 3.2. BSD
April 7, 2004 BSD
All times are GMT -4. The time now is 04:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy