Sponsored Content
Top Forums Shell Programming and Scripting How to add using awk command for a group? Post 302968505 by RudiC on Thursday 10th of March 2016 04:19:04 AM
Old 03-10-2016
Why don't you combine 345 and 400 into one group, and 346 and 399 into another? Are groups always groups of two? Or three?
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

command to add users to group

does a command exist to add users to more than one group? i think the usermod command can do this but i'm not really sure. past ways of me doing this has always been to just hack the /etc/group file and put the user in whatever group i need him to be in. however, vi..ing files like /etc/groups... (2 Replies)
Discussion started by: Terrible
2 Replies

2. UNIX for Dummies Questions & Answers

Add group

Hi All, How can I add few existing groups into a group? eg. Currently, I have - projgrp1 for proj1 with members proj1usr1, proj1usr2, proj1usr3..proj1usr10 - projgrp2 for proj2 with members proj2usr1, proj2usr2 - projgrp3 for proj3 wiht members proj3usr1, proj3usr3 Now, I would like to... (3 Replies)
Discussion started by: tifmils
3 Replies

3. Shell Programming and Scripting

awk help required to group output and print a part of group line and original line

Hi, Need awk help to group and print lines to format the output as shown below INPUT FORMAT set echo on set heading on set spool on /* SCHEMA1 */ CREATE TABLE T1; /* SCHEMA1 */ CREATE TABLE T2; /* SCHEMA1 */ CREATE TABLE T3; /* SCHEMA1 */ CREATE TABLE T4; /* SCHEMA1 */ CREATE TABLE T5;... (5 Replies)
Discussion started by: rajan_san
5 Replies

4. Shell Programming and Scripting

awk group by

Hi I have a file in this format: ... 04/May/2009 16 04/May/2009 1 05/May/2009 3 05/May/2009 5 06/May/2009 1 06/May/2009 3 ... I need to sum for every day, What is the best way? Thanks all (2 Replies)
Discussion started by: mutti
2 Replies

5. Shell Programming and Scripting

Merge group numbers and add a column containing group names

I have a file in the following format. Groups of data merge together and the group number is indicated above each group. 1 adrf dfgr dfg 2 dfgr dfgr 3 dfef dfr fd 4 fgrt fgr fgg 5 fgrt fgr (3 Replies)
Discussion started by: Lucky Ali
3 Replies

6. Shell Programming and Scripting

Merge group numbers and add a column containing group names

Hi All I do have a file like this with 6 columns. Groups of data merge together and the group number is indicated above each group. 1 1 12 26 289 3.2e-027 GCGTATGGCGGC 2 12 26 215 6.7e+006 TTCCACCTTTTG 3 9 26 175 ... (1 Reply)
Discussion started by: Lucky Ali
1 Replies

7. Shell Programming and Scripting

Group by using awk

Hi All, I have a file in the following format... ***************************************************** 11/10/27 12:09 : Input Record 11/10/27 12:10 : Input Record 11/10/27 12:10 : Input Record 11/10/27 12:10 : Input Record 11/10/27 12:10 : Input Record 11/10/27 12:10 : Input... (2 Replies)
Discussion started by: sraj142
2 Replies

8. Shell Programming and Scripting

Add two more fileds to awk command

This is what I was trying but failed to do so need help. cat 1.sql | awk '{printf("%s",NR%4 ? $0",":$0"\n")}' Output :- I want to add 2 more values for each line (hostname,user name) so the output should have hostname & username (testsrv01,test1) Output should be like... (4 Replies)
Discussion started by: lazydev
4 Replies

9. Shell Programming and Scripting

How to add printf statement in awk command?

hi all i need to add the prinf statement in awk command for the converted comma separated output.... below is my code : Code Credits :RudiC awk -F, 'NF==2 {next} {ITM=$1 AMT=$2+0 CNT=$3+0 TOTA+=$2 ... (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies

10. UNIX for Beginners Questions & Answers

awk Command to add Carriage Return and Line Feed

Hello, Can someone please share a Simple AWK command to append Carriage Return & Line Feed to the end of the file, If the Carriage Return & Line Feed does not exist ! Thanks (16 Replies)
Discussion started by: rosebud123
16 Replies
NNGREP(1)						      General Commands Manual							 NNGREP(1)

NAME
nngrep - grep for news group names (nn) SYNOPSIS
nngrep [ -ainprsu ] [ -l ] [ pattern ] DESCRIPTION
nngrep can print various selections of the available news groups. Without options, nngrep will list all currently subscribed newsgroups whose name matches any of the specified patterns. If no pattern is specified, all subscribed groups will be listed. The selection of news groups against which the patterns are matches, and subsequently printed by nngrep can be limited or expanded using the following command line options and arguments: -a Use both subscribed and unsubscribed groups. Overrides the -u option. -i Use only ignored groups, i.e. which are not in the presentation sequence. -n Use only new groups. Notice that nn considers a group to be new until you have read at least one article in the group, or you have unsubscribed to the group. This means that even reasonable active news groups may remain "new" for quite some time if it only con- tains articles which are cross-posted to other groups which occur earlier in your presentation sequence. -p Use only groups with unread (pending) articles. -r Use only read groups, i.e. without unread articles. -s Use only groups which are in the presentation sequence. -u Use only unsubscribed groups. These options can be combined if they don't logically exclude each other. For example, to get the names of all "source" groups, you can use the command nngrep source You can use this to read a specific subset of news groups with nn; for example nn `nngrep -sp source` LONG LISTING
A long listing of the matched groups can be requested with the -l option. It will include the following information: SUBSCR Specifies whether the group is subscribed or not (yes/no). NEW Specifies whether the group is new or not (yes/no). UNREAD Shows the number of unread articles in the group (if any). SEQUENCE Shows the group's index in the presentation sequence. GROUP The name of the group. FILES
~/.newsrc The record of read articles ~/.nn/init The presentation sequence SEE ALSO
nn(1), nncheck(1), nngoback(1), nngrab(1), nnpost(1), nntidy(1) nnadmin(1M), nnusage(1M), nnmaster(8) AUTHOR
Kim F. Storm, Texas Instruments A/S, Denmark E-mail: storm@texas.dk 4th Berkeley Distribution Release 6.6 NNGREP(1)
All times are GMT -4. The time now is 02:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy