Search Results

Search: Posts Made By: kaustubh137
2,357
Posted By kaustubh137
Count first column on the basis of two other columns
Hello,

I have a file
=================
12 SRV1 GRP1
19 SRV1 GRP1
19 SRV1 GRP2
3 SRV1 GRP1
3 SRV1 GRP2
30 SRV1 GRP2
7 SRV1 GRP1
8 SRV1 GRP3
===========

I want output like...
4,014
Posted By kaustubh137
Thanks. It worked.
Thanks. It worked.
4,014
Posted By kaustubh137
Compare & replace contents within a file
I have 2 files

file1
1 TMQUEUE QUE1 STMW633A
100 DMADM DOMGRPSTMW633A STMW633A
100 GWADM GWTGRPSTMW633A STMW633A
100 GWADM GWTGRPSTMW633AA STMW633A
100 GWADM...
7,086
Posted By kaustubh137
Thanks aju_kup for help. It worked now. I...
Thanks aju_kup for help. It worked now.

I also want to print the value of srvid along with this output. Can you pl guide me on that
7,086
Posted By kaustubh137
Thanks aju_kup for help. It worked now. I...
Thanks aju_kup for help. It worked now.

I also want to print the value of srvid along with this output. Can you pl guide me on that
7,086
Posted By kaustubh137
Thanks. But there are other servers also. If you...
Thanks. But there are other servers also. If you look at the file then you will find other servers with names DMADM, GWADM, etc...which are enclosed in "" & from the first column
7,086
Posted By kaustubh137
Pls find the attachement
Pls find the attachement
7,086
Posted By kaustubh137
Can anyone help me on this.
Can anyone help me on this.
7,086
Posted By kaustubh137
It gave me this output : (stmw633a:nbk7pug)$...
It gave me this output :

(stmw633a:nbk7pug)$ awk '
> /^$/ {next}
> /Server/ { split ($2, tmp, "="); ar = $1" " tmp[2]; flag=1;next}
> /MIN/ && flag == 1 { split ($4, count, "=")
> total[ar] =...
7,086
Posted By kaustubh137
I am getting the output for the file which I have...
I am getting the output for the file which I have pasted as desired.But this is a test file which I have pasted here. The actual file is different. I can paste a part of the actual file for your...
7,086
Posted By kaustubh137
Desired output : ============ 6 Server1...
Desired output :
============
6 Server1 group1
2 Server2 group2
7,086
Posted By kaustubh137
yup...exactly
yup...exactly
7,086
Posted By kaustubh137
Thanks aju, But I need the count to be...
Thanks aju,

But I need the count to be displayed along with servername & group. I am not getting the correct count in this case. As I mentioned earlier, if MIN=2 for server1, group1 & MIN=3 again...
7,086
Posted By kaustubh137
I am getting following error when tried to...
I am getting following error when tried to execute the statement:
=================================================
awk 'BEGIN { RS="\n^\""; FS="\n"; }
> {
> match($1, /Server[0-9]+/, out);...
7,698
Posted By kaustubh137
Thanks Era.. May be your are correct. I have...
Thanks Era.. May be your are correct. I have posted a new thread which will give you the thorough insight.
7,086
Posted By kaustubh137
Extract a string from a file
Input File:
=====================================
"Server1" srvgrp="group1" srvid=10
CLOPT="-A -r -e /path/logfile -o /path/stdout"
VAR1=0666 VAR2=N VAR3=0666 ...
7,698
Posted By kaustubh137
Use of index in UNIX shell scripting
I have following line of code with me in one of the shell script.

LIST=`awk -v SRV=$SRV -v GRP=$GRP -v ID=$ID '{ if (index($0, GRP) && index($0, SRV) == 2 )

Can anybody help me in...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 02:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy