05-09-2005
Quote:
Originally Posted by redlotus72
Sorry, its giving same answer...
its not working....
hey use
dif=`expr $curLC - $preLC`
I missed the required spaces...on both sides of minus operator.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
Hello
I just need the line count of the file...
the file is too huge and cant count manually..
Of course i did
wc -l
But this simply got stuck..
Any suggestion...
Tried plenty of option, i know its easy, browsed the google but was not satisfied... (9 Replies)
Discussion started by: j_panky
9 Replies
5. Shell Programming and Scripting
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
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
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
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
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
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
GC(1) General Commands Manual GC(1)
NAME
gc - count graph components
SYNOPSIS
gc [ -necCaDUrs? ] [ files ]
DESCRIPTION
gc is a graph analogue to wc in that it prints to standard output the number of nodes, edges, connected components or clusters contained in
the input files. It also prints a total count for all graphs if more than one graph is given.
OPTIONS
The following options are supported:
-n Count nodes.
-e Count edges.
-c Count connected components.
-C Count clusters. By definition, a cluster is a graph or subgraph whose name begins with "cluster".
-a Count all. Equivalent to -encC
-r Recursively analyze subgraphs.
-s Print no output. Only exit value is important.
-D Only analyze directed graphs.
-U Only analyze undirected graphs.
-? Print usage information.
By default, gc returns the number of nodes and edges.
OPERANDS
The following operand is supported:
files Names of files containing 1 or more graphs in dot format. If no files operand is specified, the standard input will be used.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 The -U or -E option was used, and a graph of the wrong type was encountered.
AUTHOR
Emden R. Gansner <erg@research.att.com>
SEE ALSO
wc(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1), libgraph(3)
21 March 2001 GC(1)