Help with awk (making simple/advanced ini parser)

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help with awk (making simple/advanced ini parser)
# 8  
Old 07-18-2011
Only by empty line, it's strange. It doesn't work even with michaelrozar17 way.
# 9  
Old 07-18-2011
Can you post example of the file that the AWK code is not working with?
# 10  
Old 07-18-2011
Yes, sure. Here is full file (packed, because uploading service could touch file structure or something)
# 11  
Old 07-18-2011
Can you also post the code that you used on that file?
# 12  
Old 07-18-2011
Yes, first I put:
awk '/Weapon_DmgType_0=1/' RS= weapon.fopro > testek.txt

Then I should export everything to next file by it:
awk '/Weapon_Anim1=8/' RS= testek.txt >testek2.txt

But it seems, that Wepon_DmgType_0=2 is in testek.txt too
# 13  
Old 07-18-2011
It is impossible... Try this code:
awk '/Weapon_DmgType_0=1/' RS= weapon.fopro | grep Weapon_DmgType_0=2

# 14  
Old 07-18-2011
awk '/Weapon_DmgType_0=1/' RS= weapon.fopro | grep Weapon_DmgType_0=2

Unfortunately somehow it is.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Making a parser

input 1..100km 112..403km 500..623km required output 1..51 112..162 500..550 (i.e 50kms added to the initial distance) (2 Replies)
Discussion started by: ANKIT ROY
2 Replies

2. Shell Programming and Scripting

Java stack trace parser in awk

I want the developers to get a mail with Java stack traces on a daily bases. When something is flaged as known issue and will get a fix but mean while this does not need to get sent each dayl. This is what I got so far. It's a bash script that runs some AWK in it. To get the files that needs to... (6 Replies)
Discussion started by: chipmunken
6 Replies

3. Shell Programming and Scripting

More efficient awk parser

I have an awk parser, that works great if the data is NC_0000 (four digits), but if it is not that then the data is parsed. I'm not sure the most efficient way to obtain the desired output. Thank you :). Code: awk 'FNR > 1 && match($0, /NC_0000(*)\..*g\.(+)(.)>(.)/, a){ print a, a, a, a, a }'... (14 Replies)
Discussion started by: cmccabe
14 Replies

4. Shell Programming and Scripting

Develop a simple command line parser

I want to develop a simple command line parser so that then I can print the values of different options :tions. -analyze -filename<fileName> Via man pages I got to know getopt command would be used. Buut how to use it.. how to encrypt this in a perl script.. grateful if u could help (2 Replies)
Discussion started by: shubhamsachdeva
2 Replies

5. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

6. Shell Programming and Scripting

Advanced AWK Regexp substring to int & Replace

Hi! I have a difficult problem, to step up a unknown version number in a text file, and save the file. It would be great to run and the version gets increased. Example the content of the textfile.txt hello version = x bye This include three steps 1. First find the char after... (2 Replies)
Discussion started by: Beachboy72
2 Replies

7. Shell Programming and Scripting

Advanced sed/awk help

I have thousands of files in HTML that looks like this: .... .... .... <!-- table horaire --> <!-- table horaire --> <table border="0" cellspacing="0" cellpadding="0" class="tblHoraires" summary="Table des horaires de la ligne 12"> <tr> <th scope="row"... (13 Replies)
Discussion started by: charafantah
13 Replies

8. Shell Programming and Scripting

advanced awk

Hi all Input group1 user1 user2 user3 group2 user4 user5 user1 group3 user6 user7 user8 Desired output group1 group2 (12 Replies)
Discussion started by: wakatana
12 Replies

9. UNIX for Advanced & Expert Users

Simple advanced question

This is a fairly basic advanced question! Does anyone happen to know what level of page faults should be acceptable on a fully operational production system? Useful (?) information: Production system using Oracle database Compaq Tru64 UNIX Server (not sure what model, but it's big!) 8... (14 Replies)
Discussion started by: Neil_mw
14 Replies
Login or Register to Ask a Question