Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Problem with ranges of numbers Post 302536059 by itkamaraj on Monday 4th of July 2011 03:51:54 AM
Old 07-04-2011
Code:
 
while read firstNum secondNum
do
     seq $firstNum $secondNum
done < input

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem with floating point numbers in awk

hi all, i have the following problem using awk in a script i want to read the values from a column with real numbers and calculate the mean.the problem is that when i use a statement such as this num = $4 i cant find a way to convert the variable from string to floating point to perform... (7 Replies)
Discussion started by: kanagias
7 Replies

2. Shell Programming and Scripting

grep or awk problem, unable to extract numbers

Hi, I've trouble getting some numbers from a html-file. The thing is that I have several html-logs that contains lines like this: nerdnerd, how_old_r_u:45782<br>APPLY: <hour_second> Verification succeded This is some of what I've extracted from a html file but all I really want is the number... (7 Replies)
Discussion started by: baghera
7 Replies

3. UNIX for Dummies Questions & Answers

Awk ranges for selecting numbers

Hi, I am trying to use AWK to do some editing and formating of large tables of numbers and I am having trouble getting it to work. For brevities sake, I won't show the whole table, but I have a sample set of code: und$ awk '{($2+0) > 50;print $1}' temp 2000 147 2008 128 2002 100 1999 47... (2 Replies)
Discussion started by: ikerrin1@gmail.
2 Replies

4. Shell Programming and Scripting

Problem with sub command (awk) and numbers

Hi, I am trying to perform a simple soustraction between two floating numbers and cannot get it done for some reason due to the use of the sub command. The following is the straight-forward result of the soustraction: $ echo | gawk '{a=968;b=967.99;c=a-b;print c}' ... (2 Replies)
Discussion started by: Indalecio
2 Replies

5. Shell Programming and Scripting

Problem with format numbers

Hello Everyone! I hope you can help me!! I have this little problem: I executed oracle query and the output of the result are in a text file called "DATAFILE.txt", and the value of file is: 97.37 Well, the script compare the result in text file with a condition: ... (5 Replies)
Discussion started by: bobbasystem
5 Replies

6. UNIX for Dummies Questions & Answers

Magic numbers '&' operator problem

Hello everyone, on the man page of "magic(5)" There is explanation "&, to specify that the value from the file must have set all of the bits that are set in the specified value" . My question is that what is the difference between '&' and equal operator '=' ? I tested it with file... (6 Replies)
Discussion started by: segmentation
6 Replies

7. UNIX for Dummies Questions & Answers

Magic numbers string/B problem

Hello, In manpage magic(5) " The “B” flag compacts whitespace in the target, which must contain at least one whitespace character. If the magic has n consecutive blanks, the target needs at least n consecutive blanks to match. The “b” flag treats every blank in the target as an optional... (4 Replies)
Discussion started by: segmentation
4 Replies

8. Shell Programming and Scripting

Problem with numbers in exponential format

Hi I have a shell scribt with some numbers in exponential format, for example, "1.23456789E +01" Now I would like to bring these numbers into a format without the E. Can someone help me Thanks Flo ---------- Post updated at 10:07 AM ---------- Previous update was at 09:14 AM... (1 Reply)
Discussion started by: sbfly
1 Replies

9. Shell Programming and Scripting

Values between ranges

Hi, I have two files file1 chr1_22450_22500 chr2_12300_12350 chr1_34500_34550 file2 11000_13000 15000_19000 33000_44000 If the file 1 ranges fall between file2 ranges then assign the value of file2 in column 2 to file1 output: chr2_12300_12350 11000_13000 chr1_34500_34550 ... (7 Replies)
Discussion started by: Diya123
7 Replies

10. Shell Programming and Scripting

Print numbers between two number ranges

Hi, I have a list.txt file with number ranges and want to print/save new all.txt file with all the numbers and between the numbers. == list.txt == 65936 65938 65942 && 65943 65945 ... (7 Replies)
Discussion started by: AK47
7 Replies
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 10:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy