Sponsored Content
Top Forums Shell Programming and Scripting Select lines in which column have value greater than some percent of total file lines Post 302515841 by vaibhavkorde on Thursday 21st of April 2011 04:13:57 AM
Old 04-21-2011
Actually the total number of lines present in the file will be the length
and we need to choose the column in some percents of it
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Total of lines w/out header and footer incude for a file

I am trying to get a total number of tapes w/out headers or footers in a ERV file and append it to the file. For some reason I cannot get it to work. Any ideas? #!/bin/sh dat=`date +"%b%d_%Y"` + date +%b%d_%Y dat=Nov16_2006 tapemgr="/export/home/legato/tapemgr/rpts"... (1 Reply)
Discussion started by: gzs553
1 Replies

2. Shell Programming and Scripting

Find lines greater than 80 characters in a file

Hi, Can anyone please give me the grep command to find all the lines in a file that exceed 80 columns Thanks, gubbala (8 Replies)
Discussion started by: mrgubbala
8 Replies

3. Shell Programming and Scripting

total number of lines in a file

Hi , How about find the total number of lines in a file ? How can i do that with the "grep" command ? (9 Replies)
Discussion started by: Raynon
9 Replies

4. UNIX for Dummies Questions & Answers

Select only certain lines from file and mantain formatting

I want to take the below data, and have it output to file only the STMC#/(IP address) and the "there are X number of updates to install" lines for each machine. I know it's easy, but Im a beginner in BASH stuff, my solution would probably take way too many lines to do something easy.Thanks! ... (5 Replies)
Discussion started by: glev2005
5 Replies

5. Shell Programming and Scripting

quickest way to get the total number of lines in a file

i have a file that's about 2GB, i have to get the total number of lines in this file every 10 minutes. the interval is not an issue. i just need the proper, most efficient way to do this. any ideas? i got the following from another thread on this site, but: awk 'int(100*rand())%5<1'... (12 Replies)
Discussion started by: SkySmart
12 Replies

6. UNIX for Dummies Questions & Answers

How to randomly select lines from a text file

I have a text file with 1000 lines, I want to randomly select 200 lines from it and print them as output. How do I go about doing that? Thanks! (7 Replies)
Discussion started by: evelibertine
7 Replies

7. Shell Programming and Scripting

Select lines from a file based on a criteria

Hi I need to select lines from a txt file, I have got a line starting with ZMIO:MSISDN= and after a few line I have another line starting with 'MOBILE STATION ISDN NUMBER' and another one starting with 'VLR-ADDRESS' I need to copy these three lines as three different columns in a separate... (3 Replies)
Discussion started by: Tlcm sam
3 Replies

8. Shell Programming and Scripting

awk - mixed for and if to select particular lines in a data file

Hi all, I am new to AWK and I am trying to solve a problem that is probably easy for an expert. Suppose I have the following data file input.txt: 20 35 43 20 23 54 20 62 21 20.5 43 12 20.5 33 11 20.5 89 87 21 33 20 21 22 21 21 56 87 I want to select from all lines having the... (4 Replies)
Discussion started by: naska
4 Replies

9. Shell Programming and Scripting

awk to select lines with maximum value of each record based on column value

Hello, I want to get the maximum value of each record separated by empty line based on the 3rd column of each row within each record? Input: A1 chr5D 634 7 82 707 A2 chr5D 637 6 82 713 A3 chr5D 637 5 82 713 A4 chr5D 626 1 82 704... (4 Replies)
Discussion started by: yifangt
4 Replies

10. Shell Programming and Scripting

awk to calculate total and percent off field in file

Trying to use awk to print the lines in file that have either REF or SNV in $3, add a header line, sort by $4 in numerical order. The below code does that already, but where I am stuck is on the last part where the total lines are counted and printed under Total_Targets, under Targets_less_than is... (4 Replies)
Discussion started by: cmccabe
4 Replies
OCAMLWC(1)						      General Commands Manual							OCAMLWC(1)

NAME
ocamlwc - count the lines of code and comments in OCaml sources SYNOPSIS
ocamlwc [options] [files] DESCRIPTION
ocamlwc is a program to count the number of lines of code and documentation in OCaml sources. It assumes its input to be lexically well- formed. If no files are given, then ocamlwc reads from stdin. The first column of the output lists the number of source lines of code, the second column the number of lines of documentation, and the third the respective filename. If ocamlwc acts on more than one file, then it prints a total in the last line. OPTIONS
-p Print percentage of documentation (in an additional column after the filename). -c Print only the code size, i.e., omit the documentation column. -e (everything) Do not skip headers. A header is the first comment in a file. -a (all) Do not skip generated files. foo.ml is a generated file if one of foo.mll, foo.mly, or foo.ml4 is amongst the given files. foo.mli is a generated file if foo.mly is amongst the given files. -h Print short usage information. AUTHOR
ocamlwc was written by Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>. This manual page was written by Georg Neis <gn@oglaroon.de>. January 2, 2007 OCAMLWC(1)
All times are GMT -4. The time now is 08:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy