Sponsored Content
Top Forums Shell Programming and Scripting Simplifying IPv6 addresses from user input Post 302524677 by sandeepjeede on Tuesday 24th of May 2011 07:32:23 AM
Old 05-24-2011
Data Simplifying IPv6 addresses from user input

hi friends,
im new to scripting and am tiring out to valid an ip address if user inputs
Code:
9 : 003 : 0 : 0 : 100 : 256

,i need to suppress all leading zeros and single zero
ie out put for the same should be
Code:
9 : 3 :   :   : 100 : 256

can any help using awk ,regular expression to split the string
and validate...

Moderator's Comments:
Mod Comment Please use a descriptive subject for threads, not just "Help"

Last edited by pludi; 05-24-2011 at 08:42 AM.. Reason: Title, formatting
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

searching for strings/user IP addresses

Hi, I'm trying to write a script, which will perform the following actions. Pick up the IP address of the PC I have used to telnet into the SUN server. Export this. Run the rest of my script. I am struggling with the first part, I know the IP address can be displayed by the command... (2 Replies)
Discussion started by: 30694
2 Replies

2. UNIX for Advanced & Expert Users

Assigning multiple IPV6 addresses with ISC dhcpd

Hi, Apologies if this is the wrong forum or this question has been answered already. I'm using the ISC dhcpd server on Centos 6.0, and can happily assign a single IPV6 address to a client with entries like this: subnet6 fd01:0:0:5::/64 { option dhcp6.name-servers fd01:0:0:5::226;... (0 Replies)
Discussion started by: jusme
0 Replies

3. Shell Programming and Scripting

How to get the user input recursively until the user provides valid input

Hi, echo "Enter file name of input file list along with absolute path : " read inputFileList if then for string in `cat inputFileList` do echo $string done else echo " file does not exist" fi From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
1 Replies

4. Shell Programming and Scripting

Script interacts with user , based on user input it operates

i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled. #!/bin/sh echo " Enter your choice to continue y/Y OR n/N to quit " read A if then echo " user requested to continue " ##some commands... (7 Replies)
Discussion started by: only4satish
7 Replies

5. UNIX for Dummies Questions & Answers

How can i know last 10 IP addresses of a user id in UNIX?

Hi, I am working on a project where i can commit the project filles using UNIX commands. Without my awareness some body has changed and commited the project files with my login credentials. Now I want to know the UNIX command to find out the last 10(or) more IP addresses that uses my project... (4 Replies)
Discussion started by: saikrishna_1245
4 Replies

6. Shell Programming and Scripting

User input and run awk using the input

I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :). The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
7 Replies

7. UNIX for Dummies Questions & Answers

Assigning ipv6 to bonding interface - getting old as well as changed ipv6 in ifconfig output

Hi, I have created a bonding bond1 interface with 6 Eth , mode=4. Recently i have changed my old ipv6 to new one and tried to restart as well as reload network service. Post which i can see old as well as changed ipv6 in ifconfig command output. Below are few files and command output for your... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies

8. Solaris

How to assign IPv4 and IPv6 addresses with same interface?

Hello dears how to assign IPv4 and IPv6 addresses with same interface on solaris 10 (1 Reply)
Discussion started by: ttashman
1 Replies
mlib_ImageColorYCC2RGB_Fp(3MLIB)			    mediaLib Library Functions				  mlib_ImageColorYCC2RGB_Fp(3MLIB)

NAME
mlib_ImageColorYCC2RGB_Fp - YCC to RGB color conversion SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_ImageColorYCC2RGB_Fp(mlib_image *dst, const mlib_image *src); DESCRIPTION
The mlib_ImageColorYCC2RGB_Fp() function performs a color space conversion from ITU-R Rec.601 Y'CbCr to computer R'G'B'. The source and destination images must be three-channel images. It uses the following equation: |R'| |cmat[0] cmat[1] cmat[2]| |Y'| |offset[0]| |G'| = |cmat[3] cmat[4] cmat[5]| * |Cb| + |offset[1]| |B'| |cmat[6] cmat[7] cmat[8]| |Cr| |offset[2]| where cmat[] = { 298.082/256, 0.000/256, 408.583/256, 298.082/256, -100.291/256, -208.120/256, 298.082/256, 516.411/256, 0.000/256 }; offset[] = { -222.922, 135.575, -276.836 }; src[x][y] = { Y', Cb, Cr }; dst[x][y] = { R', G', B' }; 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_ImageColorConvert2(3MLIB), mlib_ImageColorConvert2_Fp(3MLIB), mlib_ImageColorRGB2XYZ(3MLIB), mlib_ImageColorRGB2XYZ_Fp(3MLIB), mlib_ImageColorRGB2YCC(3MLIB), mlib_ImageColorRGB2YCC_Fp(3MLIB), mlib_ImageColorYCC2RGB(3MLIB), attributes(5) SunOS 5.10 10 Nov 2004 mlib_ImageColorYCC2RGB_Fp(3MLIB)
All times are GMT -4. The time now is 02:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy