Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Awk: Performing "for" loop within text block with two files Post 303029163 by jvoot on Tuesday 22nd of January 2019 03:40:35 PM
Old 01-22-2019
Reply deleted.

Last edited by jvoot; 01-22-2019 at 06:15 PM.. Reason: Significant error in description.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Printing "END" before a new loop in AWK

First off, I have been learning AWK by trial and error over the last week or so, and there are some gaps in my basic understanding of the language. Here is my situation: I am coding and outputting results from an experiment I conducted in Psyscope, which has all been compiled into a master file.... (2 Replies)
Discussion started by: ccox85
2 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

4. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Get values from 2 files - Complex "for loop and if" awk problem

Hi everyone, I've been thinking and trying/changing all day long the below code, maybe some awk expert could help me to fix the for loop I've thought, I think I'm very close to the correct output. file1 is: <boxes content="Grapes and Apples"> <box No.="Box MT. 53"> <quantity... (8 Replies)
Discussion started by: Ophiuchus
8 Replies

7. Shell Programming and Scripting

Using sed to find text between a "string " and character ","

Hello everyone Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies

8. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

9. Shell Programming and Scripting

For Loop Field editing - without using "awk"

Hi, I'm using Linux and bash shell. I have a file (F1.txt) with contents like Table1 Column1 123abc Table1 Column2 xyz Table2 Column1 543 Now, I would like to get the output as UPDATE Table1 SET Column1='123abc'; UPDATE Table1 SET Column2='xyz'; UPDATE Table2 SET Column1='543';... (3 Replies)
Discussion started by: Dev_Dev
3 Replies

10. Shell Programming and Scripting

Using "for" loop within "awk"

Hi Team. I am trying to execute a simple for loop within an awk but its giving a different result. Below is the main code: awk '{for(i=1;i<=6;i++) print $i}'The result should be 1 2 3 4 5 6 but its not giving this result. Can someone please help? (3 Replies)
Discussion started by: chatwithsaurav
3 Replies
CosPropertyService_PropertySetDef(3erl) 		     Erlang Module Definition			   CosPropertyService_PropertySetDef(3erl)

NAME
CosPropertyService_PropertySetDef - This module implements the OMG CosPropertyService::PropertySetDef interface. DESCRIPTION
To get access to the record definitions for the structures use: -include_lib("cosProperty/include/CosPropertyService.hrl"). This module also exports the functions described in CosPropertyService_PropertySet EXPORTS
get_allowed_property_types(PropertySetDef) -> Reply Types PropertySetDef = #objref Reply = {ok, PropertyTypes} PropertyTypes = [CORBA::TypeCode] This operation return the TypeCodes which we are allowed to use when adding new properties. get_allowed_properties(PropertySetDef) -> Reply Types PropertySetDef = #objref Reply = {ok, PropertyDefs} PropertyDefs = [#'CosPropertyService_PropertyDef'{property_name = Name, property_value = Value, property_mode = Mode}] Name = string() Value = #any Mode = normal | read_only | fixed_normal | fixed_readonly | undefined This operation a sequence of the allowed properties we may alter; depends on which mode associated with a certain property. define_property_with_mode(PropertySetDef, Name, Value, Mode) -> Reply Types PropertySetDef = #objref Name = non-empty string() Value = #any Mode = normal | read_only | fixed_normal | fixed_readonly | undefined Reply = ok | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}} | {'EXCEPTION', #CosPropertyService_ConflictingProp- erty{}} | {'EXCEPTION', #CosPropertyService_UnsupportedTypeCode{}} | {'EXCEPTION', #CosPropertyService_UnsupportedProperty{}} | {'EXCEPTION', #CosPropertyService_UnsupportedMode{}} | {'EXCEPTION', #CosPropertyService_ReadOnlyProperty{}} This operation attempts to associate a new property with the target object. If we fail to do so the appropriate exception is raised. define_properties_with_modes(PropertySetDef, PropertyDefs) -> Reply Types PropertySetDef = #objref PropertyDefs = [#'CosPropertyService_PropertyDef'{property_name = Name, property_value = Value, property_mode = Mode}] Name = string() Value = #any Mode = normal | read_only | fixed_normal | fixed_readonly | undefined Reply = ok | {'EXCEPTION', #CosPropertyService_MultipleExceptions{exceptions = Excs}} Excs = [#'CosPropertyService_PropertyException{reason = Reason, failing_property_name = Name}] Reason = invalid_property_name | conflicting_property | property_not_found | unsupported_type_code | unsupported_property | unsupported_mode | fixed_property | read_only_property This operation attempts to associate the given Property Definitions with the target object. If one or more attempts fail an excep- tion is raised describing which properties we where not able to create. get_property_mode(PropertySetDef, Name) -> Reply Types PropertySetDef = #objref Name = string() Reply = Mode | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}} | {'EXCEPTION', #CosPropertyService_PropertyNot- Found{}} Mode = normal | read_only | fixed_normal | fixed_readonly | undefined This operation returns the type of the given property. get_property_modes(PropertySetDef, Names) -> Reply Types PropertySetDef = #objref Names = [string()] Reply = {boolean(), PropertyModes} PropertyModes = [#'CosPropertyService_PropertyMode'{property_name = Name, property_mode = Mode}] Name = string() Mode = normal | read_only | fixed_normal | fixed_readonly | undefined This operation returns the modes of the listed properties. If the boolean flag is false, all properties with mode undefined this operation failed to comply. set_property_mode(PropertySetDef, Name, Mode) -> Reply Types PropertySetDef = #objref Name = string() Mode = normal | read_only | fixed_normal | fixed_readonly | undefined Reply = ok | {'EXCEPTION', #CosPropertyService_InvalidPropertyName{}} | {'EXCEPTION', #CosPropertyService_UnsupportedMode{}} | {'EXCEPTION', #CosPropertyService_PropertyNotFound{}} This operation changes the given property's mode. Return the appropriate exception if not able to fulfill the request. set_property_modes(PropertySetDef, PropertyModes) -> Reply Types PropertySetDef = #objref PropertyModes = [#'CosPropertyService_PropertyMode'{property_name = Name, property_mode = Mode}] Name = string() Mode = normal | read_only | fixed_normal | fixed_readonly | undefined Reply = ok | {'EXCEPTION', #CosPropertyService_MultipleExceptions{exceptions = Excs}} Excs = [#'CosPropertyService_PropertyException{reason = Reason, failing_property_name = Name}] Reason = invalid_property_name | conflicting_property | property_not_found | unsupported_type_code | unsupported_property | unsupported_mode | fixed_property | read_only_property This operation attempts to update the listed properties mode's. Raises an exception which describe which and why an operation failed. Ericsson AB cosProperty 1.1.13 CosPropertyService_PropertySetDef(3erl)
All times are GMT -4. The time now is 05:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy