Sponsored Content
Full Discussion: o/p column wise by nawk
Top Forums Shell Programming and Scripting o/p column wise by nawk Post 302241468 by aaysa123 on Monday 29th of September 2008 11:45:04 AM
Old 09-29-2008
Java

hi yes i tried it..
it is working fine but can i do sum if coloum A and B both varies
and also can i find count value

if i have a file a.txt
1501,ABB,2.00
1525,AAA,2.00
1501,ACC,2.00
1525,AAA,2.00
1501,AAA,3.00
1525,DDD,3.00
1525,AAA,3.00
1501,AAA,3.00
1501,AAA,3.00

and o/p should be
data1,data2,sum,count
1501,AAA,9,3
1525,AAA,7,3
1501,ABB,2,1
1501,ACC,2,1
1525,DDD,3,1

pls help me
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

processing matrix column wise

I have a m X n matrix written out to file, say like this: 1,2,3,4,5,6 2,6,3,10,34,67 1,45,6,7,8,8 I want to calculate the column averages in the MINIMUM amount of code or processing possible. I would have liked to use my favorite tool, "AWK" but since it processes rowwise, getting the... (5 Replies)
Discussion started by: Abhishek Ghose
5 Replies

2. Shell Programming and Scripting

Column wise file parsing.

Shell script for the below operation : File "A" contains : SEQ++1' MOA+9:000,00:ABC' RFF+AIK:000000007' FII+PH+0170++AA' NAD+PL+++XXXXXXXXXXX XXXXXXX XX++XXX XXXX XXXX X.X. XXXXXXXXX+++NL' SEQ++2' MOA+9:389,47:ABC' RFF+AIK:02110300000008' FII+PH+0PSTBNL2A:25:5+BB'... (5 Replies)
Discussion started by: navojit dutta
5 Replies

3. Solaris

column wise substitution in a file

Hi, I have two files. Want to make an addition of the fifth column of from both the files and redirect it to a third file. Both files have same records except fifth field and same record should be inserted into new file having fifth field as addition of fifth fields of both files. for... (2 Replies)
Discussion started by: sanjay1979
2 Replies

4. Shell Programming and Scripting

Sum of column by group wise

Hello All , I have a problem with summing of column by group Input File - COL_1,COL_2,COL_3,COL_4,COL_5,COL_6,COL_7,COL_8,COL_9,COL_10,COL_11 3010,21,1923D ,6,0,0.26,0,0.26,-0.26,1,200807 3010,21,192BI ,6,24558.97,1943.94,0,1943.94,22615.03,1,200807 3010,21,192BI... (8 Replies)
Discussion started by: jambesh
8 Replies

5. Shell Programming and Scripting

Search a file column wise and delete it

i have a file which has a column that is unique i am intending to serach it and if it is there to remove the row. the file looks like ROLLNO,NAME ,SUB1,SUB2,SUB3,TOTAL,PERCENTAGE,RESULT 15 ,rig ,34 ,56 ,87 ,177 ,59 % ,PASS 23 ,wel ,45 ,76 ,56 ,177 ,59 % ... (0 Replies)
Discussion started by: gotam
0 Replies

6. Shell Programming and Scripting

Search a file column wise and delete it

Scottn, m really sorry but i have not got my answer yet. my concern is how to delete the row !!! i have a file which has a column that is unique i am intending to serach it and if it is there to remove the row. the file looks like ROLLNO,NAME ,SUB1,SUB2,SUB3,TOTAL,PERCENTAGE,RESULT... (9 Replies)
Discussion started by: gotam
9 Replies

7. Shell Programming and Scripting

Column wise text adding

Hi I have pasted sample data as below:- in data.txt Please suggest any way out: as the 3rd field is cat data.txt 22:37:34 STARTING abc 22:37:40 FAILURE sadn 00:06:42 STARTING asd 00:06:51 FAILURE ad 02:06:38 STARTING acs 02:06:46 FAILURE cz 04:06:35 STARTING xzc... (1 Reply)
Discussion started by: Gaurav198
1 Replies

8. Shell Programming and Scripting

Generate sum of a particular column date wise

Hi All, I have a file with below content 01/22/2014,23:43:00,1742.8, 01/22/2014,23:43:00,1742.8, 01/22/2014,23:44:00,1749.06666666667, 01/25/2014,23:45:00,2046.45, 01/25/2014,23:43:00,1742.8, 01/25/2014,23:44:00,1749.06666666667, 01/25/2014,23:45:00,2046.45, 01/25/2014,23:43:00,1742.8,... (4 Replies)
Discussion started by: villain41
4 Replies

9. Shell Programming and Scripting

Search/grep on row and column wise

Hello, I have a comma seperate metadata as follows: CITY ,COUNTY,STATE,COUNTRY NEW_YORK,NYC ,NY ,USA NEWARK ,ESSEX ,NJ ,USA CHICAGO ,COOK ,IL ,USA SEATTLE ,MINER ,WA ,USA In my process, I get two key values ie CITY NAME (can be one of the... (7 Replies)
Discussion started by: calredd
7 Replies

10. Shell Programming and Scripting

Proper Column wise matching

My below code works fine if none of the columns has pipe as its content in it, If it has the pipe in any of the content then the value moves to the next column. I wanted my code to work fine even if the column has pipe in it apart from the delimiter. NOTE : If there is a pipe in the content... (6 Replies)
Discussion started by: nikhil jain
6 Replies
mipadmin(1M)															      mipadmin(1M)

NAME
mipadmin - Mobile IPv4 administration utility SYNOPSIS
conf_file] [option] level] level] DESCRIPTION
is a program for performing Mobile IPv4 administration tasks, such as starting and stopping Mobile IPv4 daemons and getting information on various system parameters. The tool can interact with Mobile IPv4 daemons mipd(1M) and miprod(1M). Only root user can run When is started, the tool first reports the name and PID of the Mobile IPv4 daemon running on the system, if any. Based on this report, the user is restricted on the options that can be used. For instance, most reporting options cannot be used when no daemon is running. Another example is that the option cannot be used if a Mobile IPv4 daemon is found running. Options recognizes the following options. These can be given as command line arguments or as commands in a session. To start a session, execute without any command line arguments. options can be classified into two kinds: Administrative and Reporting. Administrative Options These options must be used exclusively, that is, they cannot be used with other administrative or reporting options. These options can be used at the command line or at the session prompt. (Abbr.: Start a Mobile IPv4 daemon. and specify the daemon to start. Note that will verify that the daemon is running before allowing use of certain reporting options. If no daemon is specified with this option, is the default daemon. (mobility agent) starts and (correspondent node) starts and cannot both be started on the same system, since only one daemon can run on a single system. If is started, the user will be notified if any interface is restarted with enabled. (Abbr.: Specify the configuration file the daemon should use. If no file is specified, the tool will start with (see mipd.conf(4)) and with (see miprod.conf(4)). (Abbr.: Stop a Mobile IPv4 daemon. If the daemon stopped is will query it for the list of interfaces on which it offers services. These interfaces have enabled, which can be disabled once is stopped. These interfaces will be dis- played to the user and will be restarted with disabled if the daemon is stopped. (Abbr. Obtain help on options. option specifies the option for which help is required. (Abbr.: Exit the session. Reporting Options Multiple reporting options may be specified at the command line or can be concatenated to form commands at the session prompt. Options that report information from the daemon can be used only when a Mobile IPv4 daemon is running. Unless stated otherwise in the description, the option applies to both and Exceptions on the usage of an option is based on the type of daemon currently running. Certain options may apply only to while others only to Even in the case of some options may apply depending on the daemon's configuration with respect to AAA functionality. offering AAA functionality is said to be in 'AAA-mode'. This terminology is used in the option descriptions below. Note that can operate in two modes: normal and AAA-mode. The option can be used to verify the mode of operation. (Abbr.: Report configuration information from the daemon. Note that this information is not reported from the configuration file. For a list of configuration information, see mipconfig(1M) or mipd.conf(4) for and miproconfig(1M) or miprod.conf(4) for (Abbr.: Global configuration information. For this information includes any AAA data. (Abbr.: Information on all security associations configured on the daemon. For these include security asso- ciations to mobile or correspondent nodes. For the information is for all home agents. (Abbr.: Information on all interfaces configured on the daemon. For these include all interfaces on which Mobility Services are offered. For information is reported for the interface that is the source IP address for all tunnels created. (Abbr.: Reports all configuration data. It is also the default option if the user does not specify any option. (Abbr.: This option applies only to It reports any home agent mobility bindings information. The option sets display mode to verbose. (Abbr.: This option applies only to It reports foreign agent visitor list information. The option sets display mode to verbose. (Abbr.: Report general information and statistical counters from the daemon. The option resets statistical counters to 0. (Abbr.: Report events (if any) logged by daemon in syslogd(1M). This option may be used even when no daemon is running. The daemon whose events are reported is selected according to the following rules: If a daemon is specified, then the most recent instance of this daemon that has logged entries in syslog is selected. If daemon is unspecified and a daemon is currently running, then the the daemon currently running is selected. If dae- mon is unspecified and no daemon is currently running, then the most recent instance of that has logged entries in sys- log is selected. selects the most recent instance of that logged entries into and selects the most recent instance of that logged entries into (Abbr.: The class of events to display. If this option is not used, then the events logged under all classes are dis- played. The level parameter may be repeated multiple times. Note that for each input to level, only events for that class are displayed. That is, events below this class in the event class hierarchy (if any) are not dis- played. (Abbr.: These messages include unrecoverable error conditions such as fatal configuration errors and daemon initialization errors. (Abbr.: These messages include recoverable error conditions including some Mobile Node registration failures. (Abbr.: These messages include conditions such as dropped packets due to unsupported features, or no system resources. (Abbr.: These messages provide detailed event logging for debugging and troubleshooting purposes. (Abbr.: Report contents of router advertisement messages sent out by This option applies only to The option sets display mode to verbose. (Abbr.: Report or change a daemon's logging level. (Abbr.: The new logging level will include any log levels below it in the hierarchy. The logging levels (from lowest to highest) are: (Abbr.: These messages include unrecoverable error conditions such as fatal configuration errors and daemon initialization errors. (Abbr.: These messages include recoverable error conditions including some Mobile Node registration failures. (Abbr.: These messages include events such as dropped packets due to unsupported features, or no system resources. (Abbr.: These messages provide detailed event logging for debugging and troubleshooting purposes. (Abbr.: Report information on any tunnels created by or For acting as a Foreign agent, this displays the tunnels from the For- eign agent to the Home Agents. For acting as a Home Agent, this displays the tunnels from the Home Agent to the For- eign Agents, and to Mobile nodes using a co-located address. For the tunnels report displays the tunnels from the Cor- respondent node to the Foreign Agent and to the Mobile nodes using a co-located address. This option may be used even when no daemon is running. The option sets display mode to verbose. (Abbr.: Report version information from the daemon. (Abbr.: Report route optimization information from the daemon. For it reports the Binding Update messages sent to correspon- dent nodes. For the option reports the Correspondent Node's Binding Cache. The option sets display mode to verbose. (Abbr.: This option applies only to operating in AAA-mode. It reports information from the dynamic home address pools (if any). Information includes addresses in the pool and whether or not they have been allocated to a Mobile Node (identi- fied by NAI). (Abbr.: This option applies only to operating in AAA-mode. It reports information on any active AAA sessions maintained by the daemon. The option sets display mode to verbose. AUTHOR was developed by Hewlett-Packard Company. SEE ALSO mipd(1M), mipconfig(1M), miproconfig(1M), miprod(1M), mipd.conf(4), miprod.conf(4). mipadmin(1M)
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy