Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help with awk (making simple/advanced ini parser) Post 302539651 by jormung on Monday 18th of July 2011 10:18:04 AM
Old 07-18-2011
Code:
 cat -eT weapon.fopro | head -50
[Proto]^M$
ProtoId=4^M$
Type=3^M$
PicMap=art\items\knife.frm^M$
PicInv=art\inven\oknife.frm^M$
Flags=134217758^M$
DisableEgg=1^M$
Deteriorable=1^M$
Weight=453^M$
Volume=1^M$
SoundId=51^M$
Cost=40^M$
Material=1^M$
Weapon_Anim1=4^M$
Weapon_MinStrength=2^M$
Weapon_ActiveUses=3^M$
Weapon_CriticalFailture=1^M$
Weapon_Skill_0=204^M$
Weapon_Skill_1=204^M$
Weapon_Skill_2=200^M$
Weapon_DmgType_0=1^M$
Weapon_DmgType_1=1^M$
Weapon_PicUse_0=art\intrface\swing.frm^M$
Weapon_PicUse_1=art\intrface\thrust.frm^M$
Weapon_PicUse_2=art\intrface\blank.frm^M$
Weapon_DmgMin_0=1^M$
Weapon_DmgMin_1=1^M$
Weapon_DmgMax_0=6^M$
Weapon_DmgMax_1=6^M$
Weapon_MaxDist_0=1^M$
Weapon_MaxDist_1=1^M$
Weapon_ApCost_0=3^M$
Weapon_ApCost_1=3^M$
Weapon_Aim_0=1^M$
Weapon_Aim_1=1^M$
Weapon_SoundId_0=51^M$
Weapon_SoundId_1=51^M$
^M$
[Proto]^M$
ProtoId=5^M$
Type=3^M$
PicMap=art\items\club.frm^M$
PicInv=art\inven\club.frm^M$
Flags=134217758^M$
DisableEgg=1^M$
Stackable=1^M$
Weight=1360^M$
Volume=2^M$
SoundId=48^M$
Cost=30^M$

Here it is.
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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 script.sh 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

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

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

7. 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

8. 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

9. 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
IEEE80211_OUTPUT(9)					   BSD Kernel Developer's Manual				       IEEE80211_OUTPUT(9)

NAME
ieee80211_encap, ieee80211_add_rates, ieee80211_add_xrates, ieee80211_send_mgmt -- software 802.11 stack output functions SYNOPSIS
#include <net80211/ieee80211_var.h> #include <net80211/ieee80211_proto.h> struct mbuf * ieee80211_encap(struct ieee80211com *ic, struct mbuf *m, struct ieee80211_node *ni); u_int8_t * ieee80211_add_rates(u_int8_t *frm, const struct ieee80211_rateset *rs); u_int8_t * ieee80211_add_xrates(u_int8_t *frm, const struct ieee80211_rateset *rs); int ieee80211_send_mgmt(struct ieee80211com *ic, struct ieee80211_node *ni, int type, int arg); DESCRIPTION
These functions handle the encapsulation and transmission of 802.11 frames within the software 802.11 stack. The ieee80211_encap() function encapsulates an outbound data frame contained within the mbuf chain m from the interface ic. The argument ni is a reference to the destination node. If the function is successful, the mbuf chain is updated with the 802.11 frame header prepended, and a pointer to the head of the chain is returned. If an error occurs, NULL is returned. The ieee80211_add_rates() utility function is used to add the rate set element *rs to the frame frm. A pointer to the location in the buffer after the addition of the rate set is returned. It is typically used when constructing management frames from within the software 802.11 stack. The ieee80211_add_xrates() utility function is used to add the extended rate set element *rs to the frame frm. A pointer to the location in the buffer after the addition of the rate set is returned. It is typically used when constructing management frames from within the software 802.11 stack in 802.11g mode. The ieee80211_send_mgmt() function transmits a management frame on the interface ic to the destination node ni of type type. The argument arg specifies either a sequence number for authentication operations, a status code for [re]association operations, or a reason for deauthentication and deassociation operations. Nodes other than ic_bss have their reference count incremented to reflect their use for an indeterminate amount of time. This reference is freed when the function returns. The function returns 0 if successful; if temporary buffer space is not available, the function returns ENOMEM. SEE ALSO
ieee80211(9) HISTORY
The ieee80211 series of functions first appeared in NetBSD 1.5, and were later ported to FreeBSD 4.6. AUTHORS
This man page was written by Bruce M. Simpson <bms@FreeBSD.org> and Darron Broad <darron@kewl.org>. BSD
September 12, 2006 BSD
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy