Sponsored Content
Full Discussion: to grep and find the count
Top Forums UNIX for Dummies Questions & Answers to grep and find the count Post 302144970 by arunkumar_mca on Monday 12th of November 2007 06:20:08 AM
Old 11-12-2007
to grep and find the count

Hi

My files is like

a|test|s|
b|test2 | n|
c|ggg|v|

i want to count the no of lines which is ending with "|" ...
Please let me know how can it be done.

Thanks,
Arun
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Grep with count

I need to count the number of instances of a dir in a set of dir with the same suffix .txt (one dir and all recursive directories). <Main Dir> <sub_dir1> <sub_dir2> <sub_dir3> <sub_dir4> and count the number of instances of a type of file, ie/ .txt files (3 Replies)
Discussion started by: t4st33@mac.com
3 Replies

2. UNIX for Dummies Questions & Answers

count on the grep

The following command lists the files which has "wPOREQ" in the files whose names are like:M*08042007* grep -l "aaa" M*08042007* I want to know the count of the files. Thank you for the help. (2 Replies)
Discussion started by: sudheshnaiyer
2 Replies

3. UNIX for Dummies Questions & Answers

Sorting using count, grep and count

Hi, I trying to sort information in a file by making count for every object. For example: A B A D A B C i would like to sort out count for each object (A's, B's and etc) but in actual case i dont know the object but i know the position ofthe object. do i need to use array as well? Any... (2 Replies)
Discussion started by: sukhpal_78
2 Replies

4. UNIX for Dummies Questions & Answers

Grep group by and count

Hi, I have several files with same filename pattern. I want to calculate count of individual files using grep/egrep. Let me be more descriptive In directory E1 i have files like ab_20091201_12:24 ab_20091201_03:24 cd_20091201_04:16 cd_20091203_08:34 ef_20091201_06:12 ef_20091201 Now i want... (3 Replies)
Discussion started by: shounakboss
3 Replies

5. UNIX for Dummies Questions & Answers

grep word count

How do I do a grep wc that counts occurences of two or more different strings? If I have string1 two times and string2 three times, how do I use wc to get the number 5? (1 Reply)
Discussion started by: locoroco
1 Replies

6. UNIX for Dummies Questions & Answers

Grep and Count Duplicates

I have a delimited file (by |), and the second field is made out of Surnames. Is it possible to list the surnames together with their count of occurances. For example, image the first two lines are the following: Joe | Doe | 30 Jane | Doe | 28 Peter | Smith | 25 John | Jones | 26 I... (2 Replies)
Discussion started by: mouthpiec
2 Replies

7. Shell Programming and Scripting

Recursive find / grep within a file / count of a string

Hi All, This is the first time I have posted to this forum so please bear with me. Thanks also advance for any help or guidance. For a project I need to do the following. 1. There are multiple files in multiple locations so I need to find them and the location. So I had planned to use... (9 Replies)
Discussion started by: Charlie6742
9 Replies

8. Shell Programming and Scripting

Exact grep and count

got a file as y.txt 1 abc,def,ghj 2 defj,abc.kdm,ijk 3 lmn,cbk,mno 4 tmp,tmop,abc,pkl 5 pri,chk,cbk,lmo 6 def,cbk.pro,abc.kdm i want to search in the above file the key word like abc looking for two outcomes by passing the parameter value as abc into function and the two outocmes are... (0 Replies)
Discussion started by: silgun
0 Replies

9. Shell Programming and Scripting

Double Grep Count

Hi Friends, I want to find all processes beginning with the name 'Admin' and then do a grep count on those processes containing a specific string i.e. However, it is giving below error ps -ef | grep ^Admin | grep -ic 'Jan' -e 'Feb' -e 'Mar' grep: Jan: No such file or directory ... (4 Replies)
Discussion started by: srkmish
4 Replies

10. UNIX for Beginners Questions & Answers

How to find the count of IP addresses that belong to different subnets and display the count?

Hi, I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output Here is how my file looks like 1.1.1.1 1.1.1.2 1.1.1.3 1.1.2.1 1.1.2.2 1.1.3.1 1.1.3.2 1.1.3.3 1.1.3.4 So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
funmerge(1)							SAORD Documentation						       funmerge(1)

NAME
funmerge - merge one or more Funtools table files SYNOPSIS
funmerge [-w|-x] -f [colname] <iname1> <iname2> ... <oname> OPTIONS
-f # output a column specifying file from which this event came -w # adjust position values using WCS info -x # adjust position values using WCS info and save old values DESCRIPTION
funmerge merges FITS data from one or more FITS Binary Table files or raw event files. The first argument to the program specifies the first input FITS table or raw event file. If "stdin" is specified, data are read from the standard input. Use Funtools Bracket Notation to specify FITS extensions and row filters. Subsequent arguments specify additional event files and tables to merge. (NB: Stdin cannot not be used for any of these additional input file arguments.) The last argument is the out- put FITS file. The columns in each input table must be identical. If an input file begins with the '@' character, it is processed as an include file, i.e., as a text file containing event file names (as well as blank lines and/or comment lines starting with the '#' sign). If standard input is specified as an include file ('@stdin'), then file names are read from the standard input until EOF (^D). Event files and include files can be mixed on a command line. Rows from each table are written sequentially to the output file. If the switch -f [colname] is specified on the command line, an addi- tional column is added to each row containing the number of the file from which that row was taken (starting from one). In this case, the corresponding file names are stored in the header parameters having the prefix FUNFIL, i.e., FUNFIL01, FUNFIL02, etc. Using the -w switch (or -x switch as described below), funmerge also can adjust the position column values using the WCS information in each file. (By position columns, we mean the columns that the table is binned on, i.e., those columns defined by the bincols= switch, or (X,Y) by default.) To perform WCS alignment, the WCS of the first file is taken as the base WCS. Each position in subsequent files is adjusted by first converting it to the sky coordinate in its own WCS coordinate system, then by converting this sky position to the sky position of the base WCS, and finally converting back to a pixel position in the base system. Note that in order to perform WCS alignment, the appropriate WCS and TLMIN/TLMAX keywords must already exist in each FITS file. When performing WCS alignment, you can save the original positions in the output file by using the -x (for "xtra") switch instead of the -w switch (i.e., using this switch also implies using -w) The old positions are saved in columns having the same name as the original positional columns, with the added prefix "OLD_". Examples: Merge two tables, and preserve the originating file number for each row in the column called "FILE" (along with the corresponding file name in the header): [sh] funmerge -f "FILE" test.ev test2.ev merge.ev Merge two tables with WCS alignment, saving the old position values in 2 additional columns: [sh] funmerge -x test.ev test2.ev merge.ev This program only works on raw event files and binary tables. We have not yet implemented image and array merging. SEE ALSO
See funtools(7) for a list of Funtools help pages version 1.4.2 January 2, 2008 funmerge(1)
All times are GMT -4. The time now is 12:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy