And what should be the expected output given your sample data?
Considering your description, it should be something like this
(use gawk, nawk or /usr/xpg4/bin/awk on Solaris)
But given your sample data, it seems more like this:
Hi im new to unix and need to find a way to grep the top 5 numbers in a file and put them into another file. For example my file looks like this
abcdef 50000
abcdef 45000
abcdef 40000
abcdef 35000
abcdef 30000
abcdef 25000
abcdef 20000
abcdef 15000
abcdef 10000
and so on...
How can... (1 Reply)
I have a text file in the following format
....
START
1,1
2,1
3,1
..
..
9,1
10,1
END
....
I want to change to the output to
....
START
1,1
2,1
3,1
.. (4 Replies)
I am trying to add free and used memory (so that i can compute percentage used)of remote nodes using shell script. I use the openssh-server,expect tool and ssh script.
1)login.txt (info of nodes):
ip1|username|password
ip2|username|password
.
.
.
3)sshlogin.sh
#!/bin/bash ... (1 Reply)
Hello,
I have a column where there are values from 1 to 150.
I want to get the frequency of values in the following ranges:
1-5
6-10
11-15
....
....
....
146-150
How can I do this in a for loop?
Thanks,
Guss (1 Reply)
Hello All,
I am having problem to find what is the smallest number from 90% of highest numbers from all numbers in file. I am having file with thousands of lines and hundreds of columns.
I am familiar mainly with bash but I am open to whatever suggestion witch will lead to the solutions.
If I... (11 Replies)
I am trying to make a script to read marks from a file then find out how many of them are above 40 (passing marks). However my script is getting stuck at "read num". I dont understand whats the problem. Any help will be much appreciated.
#!/bin/bash
set -x
count=0; countP=0; PASSMK=40... (6 Replies)
Hi,
I'm trying to match a filename that could be called anything from vout001 to vout252 and was trying to do a small test but I'm not getting the result I thought I would..
Can some one tell me what I'm doing wrong?
*****@********>echo $mynumber ... (4 Replies)
Hi again. Sorry for all the questions — I've tried to do all this myself but I'm just not good enough yet, and the help I've received so far from bartus11 has been absolutely invaluable. Hopefully this will be the last bit of file manipulation I need to do.
I have a file which is formatted as... (4 Replies)
Hello,
I have the following script
while read id fraction
do
sambamba -h -f bam -t 10 --subsampling-seed=50 -s $frac ${id}.bam -o ${id}.out.bam
done < fraction.txt
where fraction.txt has two columns (id,fraction) and 50 rows
I am unable to run this as bash is not able to read the second... (2 Replies)
Discussion started by: nans
2 Replies
LEARN ABOUT REDHAT
dviselect
DVISELECT(1) General Commands Manual DVISELECT(1)NAME
dviselect - extract pages from DVI files
SYNOPSIS
dviselect [ -s ] [ -i infile ] [ -o outfile ] list of pages [ infile [ outfile ] ]
DESCRIPTION
Dviselect selects pages from a DVI file produced by TeX, creating a new DVI file usable by any of the TeX conversion programs, or even by
dviselect itself.
A range is a string of the form even, odd, or first:last where both first and last are optional numeric strings, with negative numbers
indicated by a leading underscore character ``_''. If both first and last are omitted, the colon may also be omitted, or may be replaced
with an asterisk ``*''. A page range is a list of ranges separated by periods. A list of pages is described by a set of page ranges sepa-
rated by commas and/or white space.
Dviselect actually looks at the ten count variables that TeX writes; the first of these (count0) is the page number, with count1 through
count9 having varied uses depending on which macro packages are in use. (Typically count1 might be a chapter or section number.) A page
is included in dviselect's output if all its count values match any one of the ranges listed on the command line. For example, the com-
mand ``dviselect *.1,35:'' might select everything in chapter 1, as well as pages 35 and up. ``dviselect 10:30'' would select pages 10
through 30 (inclusive). ``:43'' means everything up to and including page 43 (including negative-numbered pages). To get all even-num-
bered pages, use ``even''; to get all odd-numbered pages, use ``odd''. If a Table of Contents has negative page numbers, ``:_1'' will
select it. Note that ``*'' must be quoted from the shell; the empty string is more convenient to use, if harder to read.
Instead of count values, dviselect can also select by ``absolute page number'', where the first page is page 1, the second page 2, and so
forth. Absolute page numbers are indicated by a leading equal sign ``=''. Ranges of absolute pages are also allowed: ``dviselect =3:7''
will extract the third through seventh pages. Dot separators are not legal in absolute ranges, and there are no negative absolute page
numbers. Even/odd specifiers, however, are legal; ``dviselect =even'' selects every other page, starting with the second.
More precisely, an asterisk or an empty string implies no limit; an equal sign means absolute page number rather than counts; a leading
colon means everything up to and including the given page; a trailing colon means everything from the given page on; the word ``even''
means only even values shall be accepted; the word ``odd'' means only odd values shall be accepted; and a period indicates that the next
count should be examined. If fewer than 10 ranges are specified, the remaining counts are left unrestricted (that is, ``1:5'' and
``1:5.*'' are equivalent). A single number n is treated as if it were the range n:n. An arbitrary number of page selectors may be given,
separated by commas or whitespace; a page is selected if any of the selectors matches its counts or absolute page number.
Dviselect normally prints the page numbers of the pages selected; the -s option suppresses this.
AUTHOR
Chris Torek, University of Maryland
SEE ALSO dviconcat(1), latex(1), tex(1)
MC-TeX User's Guide
The TeXbook
BUGS
A leading ``-'' ought to be allowed for negative numbers, but it is currently used as a synonym for ``:'', for backwards compatibility.
Section or subsection selection will sometimes fail, for the DVI file lists only the count values that were active when the page ended.
Clever macro packages can alleviate this by making use of other ``free'' count registers. Chapters normally begin on new pages, and do
not suffer from this particular problem.
The heuristic that decides which arguments are page selectors and which are file names is often wrong. Using shell redirection or the -i
and -o options is safest.
Dviselect does not adjust the parameters in the postamble; however, since these values are normally used only to size certain structures in
the output conversion programs, and the parameters never need to be adjusted upward, this has not proven to be a problem.
DVISELECT(1)