09-08-2014
Print range of numbers
Hi
I am getting an argument which specifies the range of numbers. eg: 7-15
Is there a way that i can easily (avoiding loop) print the range of number between and including the specified above.
The above example should translate to 7,8,9,10,11,12,13,14,15
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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)
Discussion started by: ProgChick2oo9
1 Replies
2. Shell Programming and Scripting
Howdy experts,
We have some ranges of number which belongs to particual group as below.
GroupNo StartRange EndRange
Group0125 935300 935399
Group2006 935400 935476
937430 937459
Group0324 935477 935549
... (6 Replies)
Discussion started by: thepurple
6 Replies
3. Shell Programming and Scripting
I want to print between the range two patterns if a particular pattern is present in between the two patterns. I am new to Unix. Any help would be greatly appreciated.
e.g.
Pattern1
Bombay
Calcutta
Delhi
Pattern2
Pattern1
Patna
Madras
Gwalior
Delhi
Pattern2
Pattern1... (2 Replies)
Discussion started by: joyan321
2 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I have two columns with data that look like this:
Col1 Col2
------ -----
a 1
a 2
a 3
a 4
a 7
a 8
a 9
a 10
a 11
b 6
b 7
b 8
b 9
b 14 (5 Replies)
Discussion started by: Gussifinknottle
5 Replies
5. UNIX for Dummies Questions & Answers
Hi I have a data file with two columns which looks like:
1 42
2 40
3 55
4 50
5 38
6 49
7 33
8 46
9 39
10 33
11 33
12 26
13 46
14 44
15 55
16 54
17 30
18 32 (7 Replies)
Discussion started by: marhuu
7 Replies
6. Solaris
hi working with sed in a shell script
using sed to print a range of lines from a given file
for example to print lines 12-24 from a file
sed 12,24p <filename>
however i need to print the line numbers, alongwith the actual lines
would this be possible at all?
Thanks (1 Reply)
Discussion started by: xinuuser
1 Replies
7. Shell Programming and Scripting
Dear Friends,
I want to know how to grep for the lines that has a number between given range(start and end).
I have tried the following sed command.
sed -n -e '/20030101011442/,/20030101035519/p'
However this requires both start and end to be part of the content being grepped. However... (4 Replies)
Discussion started by: tamil.pamaran
4 Replies
8. UNIX for Dummies Questions & Answers
##### (0 Replies)
Discussion started by: lucasvs
0 Replies
9. UNIX for Dummies Questions & Answers
I am trying to extract specific information from a large *.sam file (it's originally 28Gb).
I want to extract all lines that are on chr3 somewhere in the range of 112,937,439-113,437,438.
Here is a sample line from my file so you can get a feel for what each line looks like:
seq.4 0 ... (8 Replies)
Discussion started by: genGirl23
8 Replies
10. Shell Programming and Scripting
Hi,
In an ideal scenario, I will have a listing of db transaction log that gets copied to a DR site and if I have them all, they will be numbered consecutively like below.
1_79811_01234567.arc
1_79812_01234567.arc
1_79813_01234567.arc
1_79814_01234567.arc
1_79815_01234567.arc... (3 Replies)
Discussion started by: newbie_01
3 Replies
odump(1) General Commands Manual odump(1)
Name
odump - dumps selected parts of an object file
Syntax
odump [ options ] file...
Description
The command dumps selected parts of each object file. This command works for object files and archives of object files.
Options
The following options are available with the command:
-a Dumps the archive header for each member of the specified archive file.
-f Dumps each file header.
-g Dumps the global symbols from the symbol table of a RISC archive.
-o Dumps each optional header.
-h Dumps section headers.
-i Dumps the symbolic information header.
-s Dumps section contents.
-r Dumps relocation information.
-l Dumps line number information.
-t Dumps symbol table entries.
-zname Dumps line number entries for the specified function name.
-c Dumps the string table.
-L Interpret and print the contents of the .lib sections.
-F Dumps the file descriptor table.
-P Dumps the procedure descriptor table.
-R Dumps the relative file index table.
The command accepts these modifiers with the options:
-dnumber Dumps the section number or a range of sections starting at number and ending either at the last section number or the number
you specify with +d.
+dnumber Dumps sections in the range beginning with the first section or beginning with the section you specify with -d.
-nname Dumps information only about the specified name. This modifier works with -h, -s, -r, -l, and -t.
-p Does not print headers
-tindex Dumps only the indexed symbol table entry. You can also specify a range of symbol table entries by using the modifier -t with
the +t option.
+tindex Dumps the symbol table entries in the specified range. The range begins at the first symbol table entry or at the entry speci-
fied by -t. The range ends with the specified indexed entry.
-u Underlines the name of the file for emphasis.
-v Dumps information symbolically rather than numerically (for example, Static rather than 0X02 ). You can use -v with all the
options except -s.
-zname,number
Dumps the specified line number entry or a range of line numbers. The range starts at the number for the named function.
+znumber Dumps line numbers for a specified range. The range starts at either the name or number specified by -z The range ends with the
number specified by +z.
Also, an option and its modifier can be separated by using blanks. The name can be separated from the number that modifies -z by replacing
the comma with a blank.
The command tries to format information in a helpful way, printing information in character, hexadecimal, octal, or decimal as appropriate.
See Also
a.out(5), ar(5)
RISC odump(1)