Count the number of lines in a file with one condition
Hi Everyone,
1.txt
i know "wc -l 1.txt" can get the total lines = 11. but if i want to count only the field 6 is greater than 0, means the output should be = 3.
i can think to use for loop. but is any simple way, like awk into one line code?
please advice. thanks
---------- Post updated at 11:20 PM ---------- Previous update was at 11:04 PM ----------
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)
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)
I have a file with contents similar to this.
abcd
1234
4567
7666
jdjdjd
89289
9382
92
jksdj
9823
298
I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
Hi
I have a big xml file of having many data
</Data>
</Node>
<Node>
List
<abc>3932590983
3396003964
3355713230</abc>
</Data>
</Node>
</Data>
</Node>
<abc>3932590983
3396003964</abc>I want to count the lines present betweem tag starting with abc and ending with abc
so o/p will be... (8 Replies)
Hello,
I have 50 text files in a directory called "AllFiles"
I want to make a program that will go inside of the "AllFiles" Directory and count the number of lines in each individual text file. Then, the program will calculate how many more lines there are over 400 in each text file and... (7 Replies)
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)
hi,
How can i count the number of lines after the first line in a flat file in unix?
Say i have a flat file with a header like:
Student Name Student ID ....
Tnx (7 Replies)
Hi,
I have a file like below.
1,2,3,4,5,6,7,8,9I would like to print or copied to a file based of line count in perl
If I gave a condition 1 to 3 then it should iterate over above file and print 1 to 3 and then again 1 to 3 etc.
output should be
1,2,3
4,5,6
7,8,9 (10 Replies)
Discussion started by: Anjan1
10 Replies
LEARN ABOUT HPUX
pipcs
pipcs(1) General Commands Manual pipcs(1)NAME
pipcs - report status of POSIX interprocess communication facilities
SYNOPSIS
qname]]
DESCRIPTION
displays certain information on active POSIX interprocess communication facilities. When no options are specified, displays information in
short format for the POSIX message queues and POSIX named semaphores that are currently active in the system.
Options
The following options restrict the display to the corresponding facilities.
(none) This is equivalent to
Display details for the POSIX message queue specified
in the qname argument.
Display the list of processes and users using the
POSIX message queues.
Display information on active POSIX message queues.
Display information on active POSIX named semaphores.
Display the creation time and last modification time of
the POSIX message queues.
The options, and can be used only with the option. The options and are mutually exclusive.
The following options add columns of data to the display. See "Column Description" below.
(none) Display default columns: for all facilities:
Display all columns, as appropriate.
This is equivalent to
Display largest-allowable-size information:
for POSIX message queues:
Display information on outstanding usage:
for POSIX message queues: for POSIX named semaphores:
Column Descriptions
The column headings and the meaning of the columns in an listing are given below. The columns are printed from left to right in the order
shown below.
Facility type:
POSIX message queue
POSIX named semaphore
The facility access modes and flags.
The mode consists of nine characters that are interpreted as three sets of three characters each. The first set refers to the
owner's permissions, the next to permissions of others in the group of the facility entry, and the last to all others.
Within each set, the first character indicates permission to read, the second character indicates permission to write or alter the
facility entry, and the last character is currently unused.
Read permission is granted.
Write permission is granted.
Alter permission is granted.
The indicated permission is not granted.
The login name of the owner of the facility entry.
The group name of the group of the owner of the facility entry.
The reference count value of the facility entry.
Reference count of the POSIX message queue represents number of simultaneous open for the associated one. Similarly reference count
of the POSIX named semaphore represents number of process referencing the associated one.
The name of the facility entry.
The number of messages currently outstanding
on the associated POSIX message queue.
The maximum number of messages allowed
on the associated POSIX message queue.
The maximum number of bytes allowed
in messages outstanding on the associated POSIX message queue.
The current value on the associated POSIX named semaphore.
The initial value hold on the associated POSIX named semaphore.
WARNINGS
produces only an approximate indication of actual system status because system processes are continually changing while is acquiring the
requested information.
Do not rely on the exact field widths and spacing of the output, as these will vary depending on the system, the release of HP-UX, and the
data to be displayed.
EXAMPLES
List the processes and users using the POSIX message queues. Note that "None" is displayed if there are no processes using the POSIX mes-
sage queue.
pipcs -qP
/mq/0 :
1234457645 (root)
5433483354 (vts)
/mq/1 : None
/mq/2 :
8344835378 (user1)
List the processes and users using the POSIX message queue
pipcs -qP -N /mq/2
/mq/2 :
8344835378 (user1)
List the creation time and last modification time of the POSIX message queues. Ctime denotes creation time and Ltime denotes last modifi-
cation time.
pipcs -qT
/mq/0 :
Ctime : Mon Feb 4 05:06:40 PST 2006
Ltime : Mon Feb 6 11:06:40 PST 2006
/mq/abcd :
Ctime : Mon Feb 2 03:06:40 PST 2006
Ltime : Mon Feb 5 03:06:40 PST 2006
List the creation time and last modification time of the POSIX message queue
pipcs -qT -N /mq/0
/mq/0 :
Ctime : Mon Feb 4 05:06:40 PST 2006
Ltime : Mon Feb 6 11:06:40 PST 2006
FILES
Group names
User names
SEE ALSO pipcrm(1), mq_close(2), mq_open(2), mq_receive(2), mq_send(2), mq_unlink(2), sem_close(2), sem_open(2), sem_post(2), sem_unlink(2),
sem_wait(2).
pipcs(1)