11-19-2004
Need ls to show number of lines in each file
Hi,
I need a command that would let ls show number of lines in each file rather than file size in KBs.
I tried using wc -l as a source of input to ls but I found a problem cutting the file name since wc generates a space delimited list.
Any suggestions?
Thanks.
GmMike.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all
How can I make Emacs to show the line numbers at the left or right as a default. This might help me to quickly jump to a given line.
Thanks
SS (9 Replies)
Discussion started by: saurya_s
9 Replies
2. Shell Programming and Scripting
Hello all
Im trying to write one liner that will show me results only if the result of the expression is greater then 0
For example:
I do :
find . -name "*.dsp" | xargs grep -c SecurityHandler
the result are :
./foo/blah/a.dsp:0
./foo/blah1/b.dsp:1
./foo/blah2/c.dsp:2... (1 Reply)
Discussion started by: umen
1 Replies
3. AIX
I'm investigating an issue where rsync's to an AIX server will sometimes fail. I suspect the problem might be due to the number of simultaneous SSH connections being made to the host dropping the rsync attempts. I'd like to view the number of open ssh connections. The who command will list logged... (1 Reply)
Discussion started by: indiana_tas
1 Replies
4. Shell Programming and Scripting
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
Discussion started by: glev2005
1 Replies
5. Shell Programming and Scripting
I have a file like
blah
blah blah blah
this is the text I need,
which might be between 1-4 lines, but
always has a blank line above and below
it, and is at the end of the text file
the code tags don't show the trailing blank line. I started by deleting the last blank line with:
... (2 Replies)
Discussion started by: unclecameron
2 Replies
6. Shell Programming and Scripting
How can I find the number of lines in a file excluding lines
starting with #? (4 Replies)
Discussion started by: kristinu
4 Replies
7. Shell Programming and Scripting
Hi guys,
This is probably very easy but I've no idea how to pull this out.
Basically, I need to find errors into a very large logfile. When you grep the ID, the output is like this:
+- Type: 799911 Code: Ret: 22728954 Mand: X Def: Des: UserDes: SeqNo: 2
+- Type: 799911 Code: Ret:... (5 Replies)
Discussion started by: Arkadia
5 Replies
8. Shell Programming and Scripting
Hi,
I would like to show the difference between two numbers. For example.
input.txt
1 7
2 10
0 0
6 7
I would like a third field showing the difference between the numbers as below:
ouput.txt
1 7 6
2 10 8
0 0 0
6 7 1
How do I do this? (4 Replies)
Discussion started by: general_lee
4 Replies
9. Shell Programming and Scripting
Hi All,
This is my Scenario:
I wanted to check if a particular name or pattern is present in a file based of that rest of the program should proceed.
I want to print '0' if no matching found.
v_File_Count=`grep -i "$v_Name_Pattern" $File_Path/Master_File_List.txt | wc -l` The above command... (5 Replies)
Discussion started by: TechGyaann
5 Replies
10. UNIX for Beginners Questions & Answers
Hi
I wanted to know if there is an option in grep command to show the number of results (not the number of lines of findings).
Thanks (14 Replies)
Discussion started by: abdossamad2003
14 Replies
LEARN ABOUT DEBIAN
storebackupversions
STOREBACKUPVERSIONS(1) User Contributed Perl Documentation STOREBACKUPVERSIONS(1)
NAME
storeBackupVersions.pl - locates different versions of a file saved with storeBackup.pl.
SYNOPSIS
storeBackupVersions.pl -f file [-b root] [-v]
[-l [-a | [-s] [-u] [-g] [-M] [-c] [-m]]]
OPTIONS
--file, -f
file name (name in the backup, probably with suffix
from compression)
--backupRoot -b
root of storeBackup tree, normally not needed
--verbose, -v
print verbose messages
--locateSame, -l
locate same file with other names
--showAll, -A
same as: [-s -u -g -M -c -m]
--size, -s
show size (human readable) of source file
--uid, -u
show uid of source file
--gid, -g
show gid of source file
--mode, -M
show permissions of source file
--ctime, -c
show creation time of source file
--mtime, -m
show modify time of source file
--atime, -a
show access time of source file
It does not always work correctly when a file is saved blocked *and* non-blocked in different backups. In such cases, use option
--locateSame.
COPYRIGHT
Copyright (c) 2002-2008 by Heinz-Josef Claes (see README) Published under the GNU General Public License v3 or any later version
perl v5.14.2 2012-03-03 STOREBACKUPVERSIONS(1)