07-21-2008
adding zero's
Hi
I am comparing two files, 100th column have formatting issue
i mean 1 file have scale 4 and anothe file scale 2 ,if scale 2 need to add two zeros.Please any idea how to add two zers to 100th coulmn if scale is 2
file 1
.................1234.2000
file2
................1234.20
Thanks,
MR
10 More Discussions You Might Find Interesting
1. Solaris
I want to know how we can add a new group in solaris. As per my understanding this is done by adding a new entry in /etc/groups file (or by using groupadd command which will also add the entry in the groups file). But when I use group command to see the groups to which I belong, it shows my userid... (7 Replies)
Discussion started by: atheek
7 Replies
2. Shell Programming and Scripting
Can anybody plz help me to solve this puzzle?
amt=00002280674231
((amt = amt + 0)) # to remove leading zero's
echo $amt
prints -2014293065
but this works fine for numbers less than 2000000000.
Thanks
S (3 Replies)
Discussion started by: shivakundan
3 Replies
3. UNIX for Dummies Questions & Answers
Hi All
i need a add recored like
DateOfDU2=245,Time=00326 (in milli secounds )
DateOfDU2=245,Time=00347
DateOfDU2=245,Time=00258
DateOfDU2=246,Time=00325
DateOfDU2=246,Time=00408
DateOfDU2=246,Time=00257
DateOfDU2=247,Time=00037
DateOfDU2=247,Time=00417
DateOfDU2=247,Time=00420... (1 Reply)
Discussion started by: nalakaatslt
1 Replies
4. Shell Programming and Scripting
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies
5. Shell Programming and Scripting
Hello,
I have a main file with IP addresses like this:
Erisim var,100,172.17.241.5,4006,60,IS0799,TCP/IP
Erisim var,1003,172.17.140.4,4004,60,IS2156,TCP/IP
Erisim var,1004,172.17.140.5,4002,60,IS2636,TCP/IP
Erisim var,1005,172.17.140.5,4004,60,IS2436,TCP/IP
Erisim... (8 Replies)
Discussion started by: Spunkerspawn
8 Replies
6. Shell Programming and Scripting
Hi
I figured how to add my list of numbers. However how do I count so that after a certain number it lists the line.
Example:
12 test1
46 test2
195 test3
174 test4
634 test5
185 test6
94 test7
So basically add the numbers and when the addition reaches 300 or less
print the... (8 Replies)
Discussion started by: bombcan
8 Replies
7. AIX
Hi Admins,
I was told to add new ip,mask and gateway to my 3rd nic.so i prepared a plan doing the same via smitty. now i need to know do i plumb and unplumb before adding ip.
plz suggest
Regards
newaix (1 Reply)
Discussion started by: newaix
1 Replies
8. UNIX for Dummies Questions & Answers
Hi guys,
I am working with large data sets and often times realize that not all of the columns are aligned correctly (sometimes rows will be shifted). So when I try to do something like:
awk '{ if ($2 > 30 && $5 == $3){print}}' file > output
it won't really work since some of the rows... (2 Replies)
Discussion started by: verse123
2 Replies
9. UNIX for Dummies Questions & Answers
my shell script:
#!/bin/ksh
date +%d > /tmp/day.log
day=`tail /tmp/day.log`
############################
for example:
date +%d shows me 05
i want to add 14 days to 05 into my above script.
bc
5+15
19
but i am not sure how to put into above script. (5 Replies)
Discussion started by: lawsongeek
5 Replies
10. UNIX for Beginners Questions & Answers
I have an array in an external file, "array.txt", which contains:
char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
LEARN ABOUT MINIX
pamstretch
pamstretch(1) General Commands Manual pamstretch(1)
NAME
pamstretch - scale up a PNM or PAM image by interpolating between pixels
SYNOPSIS
pamstretch [-xscale=X] [-yscale=Y]
[-blackedge] [-dropedge] N [infile]
You can use the minimum unique abbreviation of the options. You can use two hyphens instead of one. You can separate an option name from
its value with white space instead of an equals sign.
DESCRIPTION
pamstretch scales up pictures by integer values, either vertically, horizontally, or both. pamstretch differs from pnmscale and pnmenlarge
in that when it inserts the additional rows and columns, instead of making the new row or column a copy of its neighbor, pamstretch makes
the new row or column an interpolation between its neighbors. In some images, this produces better looking output.
To scale up to non-integer pixel sizes, e.g. 2.5, try pamstretch-gen(1) instead.
Options let you select alternative methods of dealing with the right/bottom edges of the picture. Since the interpolation is done between
the top-left corners of the scaled-up pixels, it's not obvious what to do with the right/bottom edges. The default behaviour is to scale
those up without interpolation (more precisely, the right edge is only interpolated vertically, and the bottom edge is only interpolated
horizontally), but there are two other possibilities, selected by the blackedge and dropedge options.
PARAMETERS
The N parameter is the scale factor. It is valid only if you don't specify -xscale or -yscale. In that case, pamstretch scales in both
dimensions and by the scale factor N.
OPTIONS
-xscale=X
This is the horizontal scale factor. If you don't specify this, but do specify a vertical scale factor, the horizontal scale factor
is 1.
-yscale=Y
This is the vertical scale factor. If you don't specify this, but do specify a horizontal scale factor, the vertical scale factor
is 1.
-blackedge
interpolate to black at right/bottom edges.
-dropedge
drop one (source) pixel at right/bottom edges. This is arguably more logical than the default behaviour, but it means producing out-
put which is a slightly odd size.
BUGS
Usually produces fairly ugly output for PBMs. For most PBM input you'll probably want to reduce the `noise' first using something like
pnmnlfilt(1).
SEE ALSO
pamstretch-gen(1), pnmenlarge(1), pnmscale(1), pnmnlfilt(1)
AUTHOR
Russell Marks (russell.marks@ntlworld.com).
11 November 2001 pamstretch(1)