03-04-2008
Change file format
Hi I have a file in the following format
I have to convert this into four files , in the format as below.
Data under Process SFA SUccess Section gets into file Named SFA_SUCCESS inthe following format
ctr1,120
ctr2,1785
Data under Process SFA FAil gets into file Named SFA_Fail inthe following format
Ctr1,40
ctr2,624
So on...
Now the number of ctr1 under each section can change,
so we have to grab everyting under one section & place in the file, without the operators,
Statistics Report - 2008/02/07
---------------------------------------------------
process SFA Success
ctr1 <= 120
ctr2 <= 1785
ctr3 <= 2616
ctr4 <= 50958
ctr5 <= 9148
ctr6 <= 3718992
ctr7 <= 1567
ctr8 <= 203
ctr9 <= 455
ctr10 <= 199460
process SFA Fail
ctr1 <= 40
ctr2 <= 624
ctr3 <= 74
ctr4 <= 11
ctr5 <= 2
ctr6 <= 1732
ctr7 <= 21747
Process MTA Success
ctr1 => 63780
ctr2 => 63669
ctr3 => 135
ctr4 => 1674
ctr5 => 8274
ctr5 => 1772
Process MTA Fail
ctr1 => 5
ctr2 => 14
ctr3 => 10
ctr4 => 5096
ctr5 => 810
ctr6 => 1847
Any Ideas, Suggestions,
Thanks.
Anu,
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hi all...
i have a big problem, and i hope someone can help me...
i have a flat file, and its columns are separated by comma (CSV), something like this:
78 , 204R180 , 90/100 , 200001 , 12 ,200002 ,13 .....
78 , 204R180 , 90/100 , 200001 , 29 ,200002 ,30 .....
78 , 204R180 , 90/100 ,... (0 Replies)
Discussion started by: DebianJ
0 Replies
2. Shell Programming and Scripting
Hi All,
I have a file like
john::208:johnson
john::208:mery
john::208:test
admin:*:1:johnson
admin:*:1:test
and wanna convert this as
john::208:johnson,mery,test
admin:*:1:johnson,test
please help me to create a script for this
thanks in advance
John (4 Replies)
Discussion started by: johnsonpk
4 Replies
3. Shell Programming and Scripting
Hello!
I have a textfile that look like this:
"83d1:46:2b";"20091008190000";"Rögle BK - Skellefteå";"Swedish"
"d4c:46:21";"20091008190000";"Södertälje - Brynäs";"Swedish"
"d4b:46:2";"20091008190000";"HV 71 - Färjestad";"Swedish"
"838:46:b";"20091010160000";"Skellefteå - HV 71";"Swedish"... (2 Replies)
Discussion started by: condmaster
2 Replies
4. Shell Programming and Scripting
I have a file which has following contents
usmtnz-dinfsi19
62
61
18400
18800
99.7
usmtnz-dinfsi19
62
61
18400
18800
99.7
i want the o/p to be like
date (7 Replies)
Discussion started by: fugitive
7 Replies
5. Shell Programming and Scripting
Hi
I have a file with this inside:
How can I change it to:
thanks a lot
regards
Israel. (3 Replies)
Discussion started by: iga3725
3 Replies
6. Shell Programming and Scripting
Hi All,
Below are the unix files taken by the help of ls -lrt
-rw-r--r-- 1 kbehera Domain Users 293 Jul 27 13:33 sand.txt
-rw-r--r-- 1 kbehera Domain Users 4 Jul 27 13:37 sand1.txt
-rw-r--r-- 1 kbehera Domain Users 293 Jul 27 15:30 new_sand.txt
-rw-r--r-- 1 kbehera Domain Users 0 Jul 27... (2 Replies)
Discussion started by: krupasindhu18
2 Replies
7. Shell Programming and Scripting
gpio_rw = gpiochip162
audio_aplay = HDMI_0
audio_aplay = HDMI_1
audio_aplay = HDMI_2
graphic_xrandr_show = USB1
graphic_xrandr_show = USB2
graphic_xrandr_show = USB3
graphic_change_resolution = eDP1
gpio_rw = "gpiochip162"
audio_aplay = "HDMI_0 HDMI_1 HDMI_2"
graphic_xrandr_show =... (3 Replies)
Discussion started by: yanglei_fage
3 Replies
8. Shell Programming and Scripting
Hi,
We have csv file where date is coming in MM/DD/YYYY HH:MM:SS (06/23/2015 20:59:12) in multiple places
But we need to change the date format to DD/Mon/YYYY HH:MM:SS (23/Jul/2015 20:59:12) using shell script.
Please let us know how can we achieve the same. (16 Replies)
Discussion started by: dholea
16 Replies
9. Shell Programming and Scripting
Hi---Is there's way can write small shell script or perl script open "abc.txt" file and create new "new_abc.txt" file with format output below? Thanks
cat abc.txt
###########################Readme###############################
Contained with this README.TXT file are all of the
file... (7 Replies)
Discussion started by: dotran
7 Replies
10. UNIX for Beginners Questions & Answers
Hi all,
I have a file as below,
i would like the change the format of the time from "11/7/2019 20:12" to "2019-07-11 20:12:00" in the last coloumn.
any awk solution on this.
Input:
2,0,695016,1961612,497212,5800804,0,0,161,33,7605,12226,23,10,66,0,0,34,11/7/2019 20:10... (4 Replies)
Discussion started by: Raghuram717
4 Replies
id(1) General Commands Manual id(1)
NAME
id - print user and group IDs and names
SYNOPSIS
[user]
[user]
[user]
DESCRIPTION
The command writes a message to standard output, giving the user and group IDs and names for the process. If the effective and real IDs
are different, both are printed.
If the process has supplementary group affiliations (see groups(1)), the supplementary group affiliations are also written.
If the user operand is specified and the process has appropriate privileges, the user and group IDs of the selected user are written. In
this case, effective IDs are assumed to be identical to real IDs. If the selected user has more than one allowable group membership listed
in the group database, then the group membership information is written.
Options
The following options modify the behavior described above.
Display only the group ID.
The default is the effective group ID; to modify, use the option. If the process has supplementary group affiliations that
are different from the effective group ID (or the real ID if the option is used), display each such affiliation on the same
line. The default is decimal format; to modify, use the option.
Output all different group IDs (effective, real, and supplementary)
only, using the format "%u
". If there is more than one distinct group affiliation, output each such affiliation, using the
format " %u", before the <newline> is output.
With A or display the ID name instead of the ID number.
With or display the real ID instead of the effective ID.
Display only the user ID.
The default is the effective user ID; to modify, use the option. The default is decimal format; to modify, use the option.
Displays process resource group ID for
the process along with the user and group IDs and names. The option ignores user argument. See HP Process Resource Manager
in
RETURN VALUE
The error codes returned by are :
Success.
User not found or invalid options or invalid combination of options.
The option is given when PRM is not supported or configured.
EXAMPLES
To display the current user and group data:
produces:
To display the group ID number for the current process:
produces:
To display the group name for the current process:
produces:
To display the user and group data for another user:
produces:
To display the PRM group ID for the current process:
produces:
DEPENDENCIES
HP Process Resource Manager
The option requires that the optional HP Process Resource Manager (PRM) software be installed and configured. See prmconfig(1) for a
description of how to configure HP PRM, and prmconf(4) for the definition of the process resource group.
AUTHOR
was developed by HP and AT&T.
SEE ALSO
groups(1), logname(1), getuid(2).
HP Process Resource Manager: prmconfig(1), prmconf(4) in
STANDARDS CONFORMANCE
id(1)