Sponsored Content
Top Forums UNIX for Advanced & Expert Users query display number lines or records present in file only numeric value -without filename Post 302540913 by ksrivani on Friday 22nd of July 2011 03:00:15 AM
Old 07-22-2011
Power query display number lines or records present in file only numeric value -without filename

Hi all
Thanks in advance...........

Please help me for this issue............

I have a file it has 11 records . I used the command like ....
Code:
>$ wc -l file
11 file

I'm getting output like 11 file (no.of records along with filename)

here my requirement is, I want to display only no.of records without filename
like only 11.

can anyone please tell me which command I have to use?

because if I get this no.of records I have to comapre with some outfile
so shall I assign this no.of records to any variable ?

Thanks
Srivani Kolachina

Last edited by Franklin52; 07-22-2011 at 07:06 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

display lines after a particular line number

I have a file that has 1k lines and i want to print all the lines after 900th line. an 2)I want to move files f1 ,f2,f3,f4 to p1,p2,p3,p4 Please give me the commands. Thanx in adv. (6 Replies)
Discussion started by: rajashekar.y
6 Replies

2. Shell Programming and Scripting

how to display records of file

dear all, supose there is file called myfile.txt and in this file there are two records.. like this way:- myfile.txt records 1 A:B:C:D:E records 2 B:C:A:F:G I have to find A and display output as "in myfile.txt in record1 A has feild 1 and in myfile.txt in record2 A... (2 Replies)
Discussion started by: mishra_sk_in
2 Replies

3. Shell Programming and Scripting

To find the count of records from tables present inside a file.

hi gurus, I am having a file containing a list of tables.i want to find the count of records inside thes tables. for this i have to connect into database and i have to put the count for all the tables inside another file i used the following loop once all the tablenames are inside the file. ... (1 Reply)
Discussion started by: navojit dutta
1 Replies

4. Solaris

WARNING: filename <not present on Read Only file system>+pkgadd error

Hi when trying to install the package initially that i have created on to the target host, i am getting error as below for all the files/directories during pkgadd. WARNING: filename <not present on Read Only file system> ........... ........... and so on. When i do the second attempt to... (1 Reply)
Discussion started by: kiran.zamre
1 Replies

5. Shell Programming and Scripting

How to only display lines where a field has the highest number?

Hello Wondering if anybody can advise me how I can sort the below file so it only displays lines with the latest versions of an object? As you'll see some of the scripts listed in my file have more than one version number (version number is after the file extension). E.g. cdm_bri.pkb has... (2 Replies)
Discussion started by: Glyn_Mo
2 Replies

6. UNIX for Dummies Questions & Answers

To get the lines that are not present in file

Hi I have got two files File1: Row1 Row2 Row3 Row4 File2: Row3 Row4 Now my requirement is search each and every line of file1 in file2 and if the record do not exist in file2 then write that to an output file. Output file should be as below Row1 Row2 (4 Replies)
Discussion started by: sbhuvana20
4 Replies

7. UNIX Desktop Questions & Answers

How to display only the lines from a file which do not contain a given number

a. How do I display the content of the file containing what Ive merged using a filter which would display only the lines of the file which don't contain number, for example 3 or 6. (3 Replies)
Discussion started by: herberwz
3 Replies

8. Shell Programming and Scripting

Need unix commands to delete records from one file if the same record present in another file...

Need unix commands to delete records from one file if the same record present in another file... just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file.. tried with grep and while... (6 Replies)
Discussion started by: msathees
6 Replies

9. Shell Programming and Scripting

Display the Filename and Size of a File

Hello, all! Working in a Bourne shell. What command would list the filename and size of a file if the size of the file had to be bigger than $a and smaller than $b? Output (if $a is 10 bytes and $b is 50 bytes):test1.txt 15 test2.txt 30 test3.txt 50 Thanks, Ann :p (3 Replies)
Discussion started by: LowlyIntern
3 Replies

10. Shell Programming and Scripting

grep exact string from files and write to filename when string present in file

I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies
RSYNCRYPTO_RECOVER(1)					  Rsyncrypto_recover User Manual				     RSYNCRYPTO_RECOVER(1)

NAME
rsyncrypto_recover - recover all usable data from corrupted rsyncrypto filemaps SYNOPSIS
rsyncrypto_recover badfile > goodfile DESCRIPTION
This manual page documents the rsyncrypto_recover command. When the rsyncrypto command is used with the --name-encrypt command, a file containing the mapping from the plain text representation to the encrypted file names is formed. This file mapping has a strict format of records delimited by a NULL byte. A bug introduced in version 1.07 or rsyncrypto, and solved in version 1.09, caused this file to be somewhat corrupted under certain circum- stances, most notably the use of the --delete-keys command line option. It is important to note that the only records corrupted are records that were due to be deleted anyways. This bug did not result in any loss of actual important data. It did, however, leave behind a file that rsyncrypto then refused to open. rsyncrypto_recover will read in a file map, and output to the standard output only those records that are valid. PARAMETERS
badfile A file map that contains some good and some corrupted records. SEE ALSO
rsyncrypto(1) AUTHOR
rsyncrypto was written by Shachar Shemesh for Lingnu Open Source Consulting ltd. http://www.lingnu.com This manual page was written by Shachar Shemesh <shachar@debian.org> PROJECT HOMEPAGE
http://rsyncrypto.lingnu.com Lingnu Open Source Consulting May 13, 2008 RSYNCRYPTO_RECOVER(1)
All times are GMT -4. The time now is 08:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy