Sponsored Content
Full Discussion: If file exists count lines
Top Forums Shell Programming and Scripting If file exists count lines Post 302586367 by holyearth on Sunday 1st of January 2012 10:12:07 AM
Old 01-01-2012
ok guys, solved, thanks!

Last edited by holyearth; 01-01-2012 at 11:28 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count number of lines in Binary file

Hi Friends Please help me out to count number of lines in binary file. It gives some wrong(less) using wc -l. Is there any other way to count lines of binary file. Thanks. (3 Replies)
Discussion started by: vanand420
3 Replies

2. Shell Programming and Scripting

count lines of file

dear all, i want to count the lines of a flat(text) file using awk.i have tried with {print NR} but its taking lot of time for a big file like 2GB file size. so i want better efficiency...so can any body please help me with some other and better awk code? Regards, Pankaj (15 Replies)
Discussion started by: panknil
15 Replies

3. Programming

to count the number of commented lines in a file

can someone guide me how to have a C pgm to count the number of commented lines? (3 Replies)
Discussion started by: naan
3 Replies

4. Shell Programming and Scripting

Count lines between two patterns inside a file

Hi, Im doing a script to find the number of lines included inside a file newly. These lines are in between #ifdef FLAG1 and #else or #endif or #else and #endif. I tried like this, awk '/#ifdef Flag1/,/#e/{print}' aa.c | wc -l awk '/#ifndef Flag1/,/#endif/{print}' aa.c | awk... (6 Replies)
Discussion started by: priyadarshini
6 Replies

5. UNIX for Dummies Questions & Answers

Count of Number of Lines in a File

Dear Members, I want to count the number of lines in a file; for that i am using the following command : FILE_LINE_COUNT=`wc -l $INT_IN/$RAW_FILE_NAME` if i do an echo on FILE_LINE_COUNT then i get 241 /home/data/testfile.txt I don't want the directory path to be displayed. Variable... (1 Reply)
Discussion started by: sandeep_1105
1 Replies

6. Shell Programming and Scripting

Count the number of lines in a file with one condition

Hi Everyone, 1.txt Mon 08 Feb 2010 12:30:44 AM MYT;1265560244;e164:0000116047275464;T;Central;0; Mon 08 Feb 2010 12:30:46 AM MYT;1265560246;e164:0000116047275464;T;Central;0; Mon 08 Feb 2010 12:30:48 AM MYT;1265560248;e164:0000116047275464;T;Central;0; Mon 08 Feb 2010 12:30:50 AM... (1 Reply)
Discussion started by: jimmy_y
1 Replies

7. Shell Programming and Scripting

Trying to do a count on multiple lines in a file

Guys I am having a problem with being able to do a count of entries in a file. What I am trying to get a count of the total number of members that are listed in the files. So I need to pull the number of the lines after members. I tried using sed but it only seems to count the first... (7 Replies)
Discussion started by: scottzx7rr
7 Replies

8. Solaris

WC -l does not count all the lines in a file? HELP

I have a file that I need to merge with another like file. Normally I remove the trailer reocrd and merge the file and update the trailer record of the second file. I did a WC -l on the first file before I removed the trailer record, and again afterwards. The count came back the same. I opened the... (6 Replies)
Discussion started by: Harleyrci
6 Replies

9. Shell Programming and Scripting

count lines in file to variable

I have a text file in which you need to identify the number of lines that looks like this: awk '{x + +} END {print x}' filename The problem is that I do not know how this data to any variable in which then need to continue to work in a cycle for .. do not know someone help? Sorry for my... (4 Replies)
Discussion started by: gizmo16
4 Replies

10. Shell Programming and Scripting

Count number of free lines in a text file

Hi Everybody I want to write a script to count the number of lines in a file that don't ahve any thing on it, the free lines, i try to do it with fgrep "" which means to grep on the spaces but it does not work. help me please? (3 Replies)
Discussion started by: hard_revenge
3 Replies
gtans(6)							   Games Manual 							  gtans(6)

NAME
gtans - Tangram game for X SYNOPSIS
gtans [no options] DESCRIPTION
Gtans is a tangram game that runs in X. Tangram is a kind of puzzle game where the player has to arrange a set of pieces to match a given shape. OPTIONS
No command-line options Use the graphical interface to customize the program. See below. USAGE
move the pieces (known as tans) until they match the figure drawn on the right window. You must always use the seven tans and they should not be laid on top of one another. To move a tan, click and drag it with left mouse button, for rotation click AROUND it. You can flip the selected tan by right-clicking. This is usefull for the parallelogram tan (all positions can not be reached by rotating only). If you are a beginner to Tangram you should try the first 10 figures. The other ones are not sorted, some of them are very difficult (to my taste). When a figure has been solved the background color of the silhouette area changes. The solved figures are remembered by saving a status file in the user's directory (~/.gtans/afile.figures.status for a figure file called afile.figures) Show a tan This button shows the position of a tan. Each further click will display an other tan. Show outline Draw the figure in the main area. This makes the game much easier. Preferences Most of this menu's options allow you to change the colors used by the game. For the main area you may choose textures (pixmap files) instead of colors. Some sample files are supplied (I can't remember where I found them) but as the complete pathname is saved in the config file you can choose a file located anywhere (for example in /usr/share/pixmaps/). On a 8 bits display the colors may not be exactly what you want (GTK tries to find the best matching color). Preferences/Tans size/Increase Makes the tans 5 % bigger relatively to the game area. If you resize the window the tans size will be scaled. Preferences/Tans size/Decrease Makes the tans 4.76 % smaller Preferences/Accuracy Changes the precision of the comparison between the tans position and the solution. A lower accuracy makes the game more easy. Preferences/Rotation Step by step allows only rotation by increment of 11.5 degrees. Continuous rotation makes the game more difficult and you probably shouldn't use it unless you really dislike step by step rotation. Preferences/Figures file Allows you to choose another figures file. Preferences/Save config Save a config file in the user's home directory. Misc/Clear figure status Set the current figure as unsolved. Misc/Clear all figures status Set all the loaded figures (i.e. from the current figure file) as unsolved. FILES
~/.gtans/.gtansrc Configuration options for gtans. All of these options can be set from the interface, there should be no need to edit this file. ~/.gtans/somename.figures.status Status files (for each figures file the user played with) remenbering which figures where solved. SEE ALSO
The gtans homepage at <http://gtans.sourceforge.net/>. Additional information and documentation can also be found in /usr/share/doc/gtans/ . AUTHOR
The author of gtans is Philippe Banwarth <bwt@users.sourceforge.net> February 2000 gtans(6)
All times are GMT -4. The time now is 07:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy