Sponsored Content
Full Discussion: Multiple occurance of file
Top Forums Shell Programming and Scripting Multiple occurance of file Post 302722473 by emily on Saturday 27th of October 2012 10:06:45 AM
Old 10-27-2012
Multiple occurance of file

Hi all,
I have file structure as file.log
Code:
84t-rw-r--r-- 1 emily04 us_cms 24492717 Oct  5 13:29 vgtree_84_1_K3L.root
85t-rw-r--r-- 1 emily04 us_cms 50410380 Oct  5 16:06 vgtree_85_1_uZv.root
85t-rw-r--r-- 1 emily04 us_cms 50567380 Oct  5 16:06 vgtree_85_1_hjv.root
86t-rw-r--r-- 1 emily04 us_cms 29777963 Oct  5 13:28 vgtree_86_1_YzK.root
87t-rw-r--r-- 1 emily04 us_cms 25127236 Oct  5 12:37 vgtree_87_1_8Fq.root
87t-rw-r--r-- 1 emily04 us_cms 98712736 Oct  5 12:37 vgtree_87_1_ukj.root
87t-rw-r--r-- 1 emily04 us_cms 25987236 Oct  5 12:37 vgtree_87_1_okh.root
88t-rw-r--r-- 1 emily04 us_cms 47853471 Oct  5 13:46 vgtree_88_1_EGK.root

For me I would like to have the output of the duplicates, in the given file. The duplicates are
Code:
85t-rw-r--r-- 1 emily04 us_cms 50410380 Oct  5 16:06 vgtree_85_1_uZv.root
85t-rw-r--r-- 1 emily04 us_cms 50567380 Oct  5 16:06 vgtree_85_1_hjv.root
87t-rw-r--r-- 1 emily04 us_cms 25127236 Oct  5 12:37 vgtree_87_1_8Fq.root
87t-rw-r--r-- 1 emily04 us_cms 98712736 Oct  5 12:37 vgtree_87_1_ukj.root
87t-rw-r--r-- 1 emily04 us_cms 25987236 Oct  5 12:37 vgtree_87_1_okh.root


Thanks
emily
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

count string occurance in a file hourly

Hi, I file that has all the status for one day (24hours). Now what I want to do is to count the occurence of a string in its output hourly like for example count occurance of successful or asynchronous clear destinon for every hour and redirect it to file. Please see sample file below. Please... (2 Replies)
Discussion started by: ayhanne
2 Replies

2. UNIX for Dummies Questions & Answers

replace the n'th occurance in a file

Hi All, How can i replace the n'th occurance in a file. ? I have a property file like EAR;_TrackingEAR;META-INF/application.xml;xml;context-root;1;valeur EAR;_TrackingEAR;META-INF/application.xml;xml;context-root;2;valeur2... (2 Replies)
Discussion started by: subin_bala
2 Replies

3. Shell Programming and Scripting

How to replace specific text line out of multiple occurance

Hi I would like to replace specific line eg ExitAction = NONE to ExitAction = FALSE under only TASK sipsiproc and other ExitAction = NONE will remain as usual in the file(shell script) The file contains: TASK rgcdproc { CommandLine = $SSHOME/bin/rgcd.exe NewConsole... (5 Replies)
Discussion started by: madhusmita
5 Replies

4. Shell Programming and Scripting

How to insert values in 1st occurance out of two occurance in a file

Hi I have a file which contains the following two lines which are same But I would like to insert the value=8.8.8.8 in the 1st occurance line and value=9.9.9.9 in the 2nd occurance line. <parameter name="TestIp1" value=""> <parameter name="TestIp1" value=""> Please suggest (1 Reply)
Discussion started by: madhusmita
1 Replies

5. UNIX for Dummies Questions & Answers

i need 100th occurance of a letter in file

Hi to all, I am looking a file in vi editor to get 100th occurance of a latter in that file. Can any one help me in this? Thanks Sathish (1 Reply)
Discussion started by: bsathishmca
1 Replies

6. Shell Programming and Scripting

Count occurance of multiple strings using grep command

How to grep multiple string occurance in input file using single grep command? I have below input file with many IDP, RRBE messages. Out put should have count of each messages. I have used below command but it is not working grep -cH "(sent IDP Request)(Recv RRBCSM)" *.txt ... (5 Replies)
Discussion started by: sushmab82
5 Replies

7. Shell Programming and Scripting

Remove the last occurance in a file

Hi, I have hunted for an answer to this but still can't come up with a working solution. How do I delete the last of a non unique line The lines I am looking for is case "$0" in esac This can appear n times I only want the last deleted. I have tried with sed and... (1 Reply)
Discussion started by: miyoung999
1 Replies

8. Shell Programming and Scripting

Number of occurance with multiple conditions??

Hi, I the following sample of out put: + 6.07875 10 0 cbr 210 ------- 2 10.0 2.3 1461 19715 - 6.07875 10 0 cbr 210 ------- 2 10.0 2.3 1461 19715 + 6.07875 22 0 cbr 210 ------- 2 22.0 2.9 1301 19716 - 6.07875 22 0 cbr 210 ------- 2 22.0 2.9 1301 19716 r 6.07922 0 1 cbr 210 ------- 1 30.0... (6 Replies)
Discussion started by: ENG_MOHD
6 Replies

9. Shell Programming and Scripting

Extract multiple occurance of strings between 2 patterns

I need to extract multiple occurance strings between 2 different patterns in given line. For e.g. in below as input ------------------------------------------------------------------------------------- mike(hussey) AND mike(donald) AND mike(ryan) AND mike(johnson)... (8 Replies)
Discussion started by: sameermohite
8 Replies

10. Shell Programming and Scripting

Help search and replace the last occurance of match in a file

Hi I want to replace only the last occurance of "union all" in input file with ";" I tried with sed 's/union all/;/g' in my input file, it replaced in all lines of input file Eg: select column1,column2 from test1 group by 2 union all select column1,column2 from test2 group by 2 union all ... (9 Replies)
Discussion started by: antosr7
9 Replies
sysmsg(7D)							      Devices								sysmsg(7D)

NAME
sysmsg - system message routing to console devices SYNOPSIS
/dev/sysmsg DESCRIPTION
The file /dev/sysmsg routes output to a variable set of console devices. Writes to /dev/sysmsg are always directed to the system console /dev/console, and are in addition directed to a set of auxiliary console devices managed by consadm(1M). Only root has permission to write to this device. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
consadm(1M), syslogd(1M) , attributes(5), console(7D) SunOS 5.10 13 Oct 1998 sysmsg(7D)
All times are GMT -4. The time now is 12:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy