Sponsored Content
Full Discussion: line count
Top Forums Shell Programming and Scripting line count Post 302446234 by guruprasadpr on Wednesday 18th of August 2010 05:06:55 AM
Old 08-18-2010
Hi

Not sure about the performance. But you can check the other options available here: Different ways to count total lines in a file.

Guru.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get the line count from 2nd line of the file ?

Hi, I want to get the line count of the file from the 2nd line of the file ? The first line is header so want to skip that. Thanks. (8 Replies)
Discussion started by: smc3
8 Replies

2. UNIX for Dummies Questions & Answers

Count on every other line

I'd like to create a loop that will display something like: 1 2 29 2 57 2 ... 25173 2 I figure I'd want to make some code that counts to 1798 and for the odd numbers displays: 1+28((n-1)/2) and for the even numbers displays 2. This is what I wrote:#! /bin/csh #include <stdio.h> int... (4 Replies)
Discussion started by: red baron
4 Replies

3. Shell Programming and Scripting

Append line count to each line

Hello forum, I need to append the total line count to the end of each line in a file. The file where this line count needs to be appended is generated by this script: The script does a word frequency count by the first column of a file. if I add wc -l at the end then the line count... (4 Replies)
Discussion started by: jaysean
4 Replies

4. Shell Programming and Scripting

Line count

Hello friends, Could you please help on this, n=`wc -l test.txt` echo $n the above two line code give me "67 text.txt" where as i just need n= 67 as line count (3 Replies)
Discussion started by: Danish Shakil
3 Replies

5. Shell Programming and Scripting

Shell script to count number of ~ from each line and compare with next line

Hi, I have created one shell script in which it will count number of "~" tilda charactors from each line of the file.But the problem is that i need to count each line count individually, that means. if line one contains 14 "~"s and line two contains 15 "~"s then it should give an error msg.each... (3 Replies)
Discussion started by: Ganesh Khandare
3 Replies

6. Shell Programming and Scripting

Delimiter Count Line by Line

Hi All, I have totally 10 source files. I want to count the delimiter In my source files line by line and need to store the result in another file. I got the output for the total count of delimiter for one file. But I am struggling to get the delimiter count line by line for each my files. Plz... (6 Replies)
Discussion started by: suresh01_apk
6 Replies

7. Shell Programming and Scripting

line count

Hi In my directory i have file of many days , i want to count the number of line of all the files of todays date. every file will have date component on it for eg. V5_T_RIO_TAFM_20120905070015847.LOG from the file name 20120905- > this show that file is of today's date . I have written... (8 Replies)
Discussion started by: guddu_12
8 Replies

8. Shell Programming and Scripting

Compare file1 header count with file2 line count

What I'm trying to accomplish. I receive a Header and Detail file for daily processing. The detail file comes first which holds data, the header is a receipt of the detail file and has the detail files record count. Before processing the detail file I would like to put a wrapper around another... (4 Replies)
Discussion started by: pone2332
4 Replies

9. Shell Programming and Scripting

Count the pipes "|" in line and delete line if count greter then number.

Hello, I have been working on Awk/sed one liner which counts the number of occurrences of '|' in pipe separated lines of file and delete the line from files if count exceeds "17". i.e need to get records having exact 17 pipe separated fields(no more or less) currently i have below : awk... (1 Reply)
Discussion started by: ketanraut
1 Replies

10. UNIX for Beginners Questions & Answers

Count pattern line by line

I have a file like below with more than 30,000 lines: Someword "mypattern blah blah mypattern blah mypattern blah " Someotherword "mypattern blah blah mypattern blah mypattern blah" Someword "mypattern blah blah blah mypattern blah " Someword "mypattern blah blah mypattern blah ... (3 Replies)
Discussion started by: ctrld
3 Replies
GFREG(1)																  GFREG(1)

NAME
gfreg - register a Gfarm file, Gfarm file fragments, or a Gfarm directory SYNOPSIS
gfreg [ -p ] [ -h filesystem-node | -H hostfile | -D domainname ] [ -a architecture ] program ... gfarm-URL gfreg [ -i ] [ -h filesystem-node | -H hostfile | -D domainname ] localfile ... gfarm-URL gfreg -N total-num-of-fragments -I fragment-index [ -h filesystem-node | -H hostfile | -D domainname ] localfile ... gfarm-URL gfreg -r [ -h filesystem-node | -H hostfile | -D domainname ] [ -a architecture ] [ directory | program | localfile ] ... gfarm-URL DESCRIPTION
The first form copies and registers the program as a Gfarm file gfarm-URL in the Gfarm filesystem. When gfarm-URL is a directory, multiple programs can be specified. After the registration, the gfarm-URL can be specified as a program name of gfrun(1) and gfmpirun_p4(1). With- out the -p option, only executable file can be specified. With the -p option, non-executable file can be specified as well. Without the -a option or the -h option, architecture of the program is assumed to be the same architecture as the client host on that gfreg(1) is exe- cuted, which is obtained by the Gfarm metaserver. The second form registers one or more localfiles as a single Gfarm file. Without the -i option, only non-executable file can be specified as localfile. With the -i option, both excutable and non-executable file can be specified as localfile. The destination filesystem node will be automatically selected by CPU load average. With any one of -h, -H, -D options, filesystem node can be limited. The third form registers localfile as a file fragment of a Gfarm file. The total number of fragments and the fragment index are specified by the -N option and the -I option, respectively. When gfarm-URL is a directory, multiple localfiles can be specified. The destination filesystemnode will be automatically decided by CPU load average unless any one of -h, -H, -D options is explicitly specified. When the gfreg command of this form is executed on a filesystem node, the local filesystem node is always selected rather than a remote filesys- temnode. In this case, -h, -H, -D options help to store files dispersively. The fourth form registers the directory as a Gfarm directory gfarm-URL, the program or the localfile as a Gfarm file gfarm-URL. If direc- tory have some sub directories and/or files, they will be registered recursively. The non-executable file localfile will be registered as a file has one fragment. A non-executable file in the directory will be registered in the same way. When gfarm-URL already exists as a directory, multiple directories, programs, and localfiles can be specified and they will be registered in gfarm-URL. They can be mixed in parameteres, while other forms inhibit this manner. If gfarm-URL does not exist, one directory or one program, or one localfile can be specified and it will be registered as gfarm-URL. Refer to the first form's part above to specify filesystem node thatprogfarms and files will reside with the -a option or the -h option. OPTIONS
-f overwrites gfarm-URL even if it exits as a Gfarm file. -? displays a list of command options. Gfarm 05 April 2006 GFREG(1)
All times are GMT -4. The time now is 03:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy