Sponsored Content
Full Discussion: help with awk command
Top Forums Shell Programming and Scripting help with awk command Post 302688407 by ctrllior on Sunday 19th of August 2012 05:11:21 AM
Old 08-19-2012
help with awk command

Hi,
i'm new here and i need your help with awk.
i got a file with this pattern of lines for example:

15/08/2012 13:04:03:265|FrameworkManager |INF|inbound 15/08/2012 13:04:03:265 80 120 srv_500 38112345999 ContentDiscovery searchByKeywordPage 0 <param[0] == Cell 0 = [subscriber Id = [ field Name = [ USERNAME ]; value = [ test ]; ]; device Id = [ value = [ Mozilla/5.0 (Linux; U; Android 2.3.6; sr-rs; U8655-1 Build/HuaweiU8655) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 ]; identifier Type = [ 3 ]; ]; locale = [ en ]; max Results = [ 1000 ]; start Index = [ 0 ]; entity Types = [ Cell 0 = [10] ; ]; media Types = [ local Item = [ ]; ]; portal = [ Telenor Serbia Mobile Portal ]; screen = [ Mobile ]; sorting Parameters = [ Cell 0 = [entity Type = [ 11 ]; sorting Entity Parameters = [ Cell 0 = [order By = [ Number of downloads ]; direction = [ desc ]; ] ; ]; ] ; ]; reserved Attr = [ local Item = [ ]; ]; ALLOWED_ ENTITY_ TYPES_ TO_ = [ Cell 0 = [4] ;Cell 1 = [10] ;Cell 2 = [4] ;Cell 3 = [3] ;Cell 4 = [9] ; ]; promoted Entity Types = [ local Item = [ ]; ]; ] ;Cell 1 = [zdrava ishrana] ;Cell 2 = [value = [ Apps Home ]; entity Type = [ 2 ]; ] ; /> current Node = [ category = [ ID:cat_513 NAME: en - Apps Home CONTENT_PROVIDER:null ]; packages Ids = [ Cell 0 = [value = [ Telenor Serbia Wap Package ]; entity Type = [ 0 ]; ] ; ]; has Special Offer = [ false ]; absolute URLPrefix = [ http://market.dobrestvari.rs:80/DS ]; ]; menu = [ ]; menu Size = [ 0 ]; favorite = [ false ]; sorting Override By Portal Enabled = [ true ];

i marked the words i need to get out from this block as bold... please help me.. :]
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

assign a command line argument and a unix command to awk variables

Hi , I have a piece of code ...wherein I need to assign the following ... 1) A command line argument to a variable e.g origCount=ARGV 2) A unix command to a variable e.g result=`wc -l testFile.txt` in my awk shell script When I do this : print "origCount" origCount --> I get the... (0 Replies)
Discussion started by: sweta_doshi
0 Replies

2. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

3. UNIX for Dummies Questions & Answers

Basic awk question...getting awk to act on $1 of the command itself

I have a script problem that I am not able to solve due my very limited understanding of unix/awk. This is the contents of test.sh awk '{print $1}' From the prompt if I enter: ./test.sh Hello World I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies

4. Shell Programming and Scripting

awk command for simple join command but based on 2 columns

input1 a_a a/a 10 100 a1 a_a 20 200 b1 b_b 30 300 input2 a_a a/a xxx yyy a1 a1 lll ppp b1 b_b kkk ooo output a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies

5. Shell Programming and Scripting

awk command in script gives error while same awk command at prompt runs fine: Why?

Hello all, Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val: > cat getnon0file.sh #!/bin/bash this="getnon0file.sh" USAGE=$this" InFile="xyz.38" Min="0.05" # awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies

6. Shell Programming and Scripting

awk command to compare a file with set of files in a directory using 'awk'

Hi, I have a situation to compare one file, say file1.txt with a set of files in directory.The directory contains more than 100 files. To be more precise, the requirement is to compare the first field of file1.txt with the first field in all the files in the directory.The files in the... (10 Replies)
Discussion started by: anandek
10 Replies

7. Shell Programming and Scripting

Multiple command execution inside awk command during xml parsing

below is the output xml string from some other command and i will be parsing it using awk cat /tmp/alerts.xml <Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies

8. Shell Programming and Scripting

Pass awk field to a command line executed within awk

Hi, I am trying to pass awk field to a command line executed within awk (need to convert a timestamp into formatted date). All my attempts failed this far. Here's an example. It works fine with timestamp hard-codded into the command echo "1381653229 something" |awk 'BEGIN{cmd="date -d... (4 Replies)
Discussion started by: tuxer
4 Replies
XmAddToPostFromList(library call)										 XmAddToPostFromList(library call)

NAME
XmAddToPostFromList -- a RowColumn function that makes a menu accessible from more than one widget SYNOPSIS
#include <Xm/RowColumn.h> void XmAddToPostFromList( Widget menu, Widget post_from_widget); DESCRIPTION
XmAddToPostFromList makes a menu accessible from more than one widget. After a menu is once created, this function may be used to make that menu accessible from a second widget. The process may be repeated indefinitely. In other words, where an application would use XmCreatePop- upMenu or XmCreatePulldownMenu or their equivalent to create a new menu identical to one that already exists, it can use this function to reuse that earlier menu. If menu refers to a Popup menu, then the post_from_widget widget can now pop up the specified menu. The actual posting of the menu occurs as it always does, either through an event handler, or the automatic popup menu support (see the XmRowColumn(3) reference page). If menu refers to a Pulldown menu, its ID is placed in the XmNsubMenuId resource of the specified post_from_widget. In this case, the post_from_widget widget must be either a CascadeButton or a CascadeButtonGadget. Note that this function manipulates the internal structures themselves, not a copy of them. menu Specifies the ID of the RowColumn widget containing the menu (Popup or Pulldown) to be made accessible from the widget. post_from_widget Specifies the widget ID of the widget which will now be able to post the menu specified by menu. For a complete definition of RowColumn and its associated resources, see XmRowColumn(3). RELATED
XmGetPostedFromWidget(3), XmRemoveFromPostFromList(3), and XmRowColumn(3). XmAddToPostFromList(library call)
All times are GMT -4. The time now is 04:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy