06-02-2008
conversion
hi all
i have a file like
151125
25252
2452567
253464576
255
i want this file to be like
'151125','25252','2452567','253464576','255'
please help
thanks
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Dear friends,
i am writing sh shell script
I have a file containing binary data.
like this.
010101010101010101101010101010100001010101010101001.
i want to read some particular bits and convert it into decimal valuse.
example.
1.first i want to read 5 bits and convert it into... (1 Reply)
Discussion started by: rajan_ka1
1 Replies
2. UNIX for Advanced & Expert Users
Hello,
I want to convert MM DD YYYY date format to MM-DD-YYYY format.
For exemple:
I have to convert Nov 28 2005 to 28-11-2005.
Thenks for youf help.
DAFI (2 Replies)
Discussion started by: dafidak
2 Replies
3. Shell Programming and Scripting
Hi everybody:
Could anybody tell me how I convert from a julian date, with shell comands, to gregorian.
Thanks in advance. (2 Replies)
Discussion started by: tonet
2 Replies
4. Shell Programming and Scripting
Is there any direct way in shell to convert exponential to other formats. For example 1.5e-07 to 0.150u. Or does shell support this microns, nano meter notations? (1 Reply)
Discussion started by: abhijanvt
1 Replies
5. Shell Programming and Scripting
Hi
I want to convert MAY 05 2005 01:15:00PM date format to 2005/05/05 01:15:00PM .
CAn somebody suggest me a code ,I am new to unix shell programming.
Thanks
Arif (21 Replies)
Discussion started by: mab_arif16
21 Replies
6. Shell Programming and Scripting
How to convert Nov 10 14:20 to YYYYMMDDHHMMSS in unix
I am using K-shell HP-AUX (1 Reply)
Discussion started by: chinniforu2003
1 Replies
7. Shell Programming and Scripting
Hi,
I have a requirement to capture file time stamp and compare with current system time. I am using HP-AUX K-shell.
Below is what i have done
Getting current date into myfile2
---------------------------------
date +%Y%m%d%H%M%S > myfile2
20091110132800
Getting the file date into... (5 Replies)
Discussion started by: chinniforu2003
5 Replies
8. Shell Programming and Scripting
Hi,
I have a variable which contains json string
ex :
temp=`curl -X GET http://localhost:5984/example/$id`
now temp contains =>... (3 Replies)
Discussion started by: shams11
3 Replies
9. UNIX for Advanced & Expert Users
Hi all,
I have one libxxx.so file ( which I got from a third party ). We use shared library libxxx.sl . Is there any way to convert the .so file to .sl file ?
Thanks in advance
- M (3 Replies)
Discussion started by: kanu_kanu
3 Replies
10. Shell Programming and Scripting
Trying to convert dates using a Perl Script but it has to accept formats like
3 letter month, day and year like Nov 02 2010 or 1/4/11 or 21 Feb 2011 and have it convert to something like October 20, 2011. Any ideas? (2 Replies)
Discussion started by: reduxeffect81
2 Replies
LEARN ABOUT SUNOS
mlib_imagecolorrgb2hsv
mlib_ImageColorRGB2HSV(3MLIB) mediaLib Library Functions mlib_ImageColorRGB2HSV(3MLIB)
NAME
mlib_ImageColorRGB2HSV - RGB to HSV color conversion
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_ImageColorRGB2HSV(mlib_image *dst, const mlib_image *src);
DESCRIPTION
The mlib_ImageColorRGB2HSV() function performs a conversion from red/green/blue to hue/saturation/value. The source and destination images
must be three-channel images.
It uses the following equations:
V = max(R, G, B)
Vmin = min(R, G, B)
S = (V - Vmin)/V
H = (5.0 + (V - B)/(V - Vmin))/6 if R = V and G = Vmin
H = (1.0 - (V - G)/(V - Vmin))/6 if R = V and B = Vmin
H = (1.0 + (V - R)/(V - Vmin))/6 if G = V and B = Vmin
H = (3.0 - (V - B)/(V - Vmin))/6 if G = V and R = Vmin
H = (3.0 + (V - G)/(V - Vmin))/6 if B = V and R = Vmin
H = (5.0 - (V - R)/(V - Vmin))/6 if B = V and G = Vmin
H = 0.0 if R = G = B
where 0 <= R, G, B, V, Vmin, S <= 1 and 0 <= H < 1.
Assuming a pixel in the source image is (r, g, b) and its corresponding pixel in the destination image is (h, s, v), then for MLIB_BYTE
images, the following applies:
R = r/255
G = g/255
B = b/255
h = H*256
s = S*255
v = V*255
for MLIB_SHORT images, the following applies:
R = (r + 32768)/65535
G = (g + 32768)/65535
B = (b + 32768)/65535
h = H*65536 - 32768
s = S*65535 - 32768
v = V*65535 - 32768
for MLIB_USHORT images, the following applies:
R = r/65535
G = g/65535
B = b/65535
h = H*65536
s = S*65535
v = V*65535
and for MLIB_INT images, the following applies:
R = (r + 2147483648)/4294967295
G = (g + 2147483648)/4294967295
B = (b + 2147483648)/4294967295
h = H*4294967296 - 2147483648
s = S*4294967295 - 2147483648
v = V*4294967295 - 2147483648
PARAMETERS
The function takes the following arguments:
dst Pointer to destination image.
src Pointer to source image.
RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
mlib_ImageColorHSV2RGB(3MLIB), mlib_ImageColorHSV2RGB_Fp(3MLIB), mlib_ImageColorRGB2HSV_Fp(3MLIB), attributes(5)
SunOS 5.10 10 Nov 2004 mlib_ImageColorRGB2HSV(3MLIB)