Sponsored Content
Top Forums Shell Programming and Scripting Print the string between spaces Post 302499428 by Scrutinizer on Thursday 24th of February 2011 11:09:32 AM
Old 02-24-2011
If you are looking for the line in blue then all of the commands above should give you this. If not, what are you getting and what output are you looking for?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Read a string with leading spaces and find the length of the string

HI In my script, i am reading the input from the user and want to find the length of the string. The input may contain leading spaces. Right now, when leading spaces are there, they are not counted. Kindly help me My script is like below. I am using the ksh. #!/usr/bin/ksh echo... (2 Replies)
Discussion started by: dayamatrix
2 Replies

2. Shell Programming and Scripting

sed: replace string with another string (with spaces)

Hi I have an XML file with strings XABCD, XEFGHX and XIJKLX. I would like to replace XABCDX with "This is the first string", XEFGHX with "This is the second string" and XIJKLX with "This is the third string". What is the best way to implement this? Should I have a file with the data that is... (4 Replies)
Discussion started by: zmfcat1
4 Replies

3. Shell Programming and Scripting

Using sed to replace a string in file with a string in a variable that contains spaces

Hi, i call my shell like: my_shell "my project name" my script: #!/bin/bash -vx projectname=$1 sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp cp temp test_config_doxy the following error occurres: sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies

4. Shell Programming and Scripting

Print filenames with spaces using awk

Hello all, I want to list the file contents of the directory and number them. I am using la and awk to do it now, #ls |awk '{print NR "." $1}' 1. alpha 2. beta 3. gamma The problem I have is that some files might also have some spaces in the filenames. #ls alpha beta gamma ... (7 Replies)
Discussion started by: grajp002
7 Replies

5. UNIX Desktop Questions & Answers

How to print several pages only text without spaces among

1 I open pdf file - it has empty borders of space without text 2 I want to print 9 pages to save paper & eyes 3 In Okular i choose print - 9 pages. And I have no option for adjusting text to text (to print without spaces among 9 pages). What program can you recommend to me for this... (1 Reply)
Discussion started by: Xcislav
1 Replies

6. UNIX for Dummies Questions & Answers

using tr to print spaces between lines

hi forum i was wondering can you use tr to print out a file like this i see that there is no way you could do that i feel i see that there is no way you could do that i feel i see that there is no way you could do that i feel i see that there is no way you could do that i feel i see that... (2 Replies)
Discussion started by: ShinTec
2 Replies

7. Shell Programming and Scripting

print columns with spaces

Hi All I've a file which is similar to the one given below column1 coulmn2 column3 column4 A B C D X Y F G H I would like to get it in this format A|B|C|D ||X|Y F||G|H Is... (4 Replies)
Discussion started by: Celvin VK
4 Replies

8. Shell Programming and Scripting

Print a specific number of spaces

i'm looking for a command that allows me to print a specific number of spaces which i will provide. something as simple as: spaces=4 printf " " * $spaces i'm looking for somethign that'll allow me to print a specific amount of spaces on a line. can awk be used for this? (4 Replies)
Discussion started by: SkySmart
4 Replies

9. Shell Programming and Scripting

awk print string with removing all spaces

Hi all, I want to set 10 set of strings into a variable where: removing all spaces within each string change the delimiter from "|" to "," Currently, I've the below script like this:Table=`ten character strings with spaces in-between and each string with delimiter "|" | tr -d ' ' |... (7 Replies)
Discussion started by: o1283c
7 Replies

10. Shell Programming and Scripting

Print between pattern without spaces

I seem to have hit a curious problem where sed and awk based regex do not seem to work. Perhaps I am missing a switch to look within the same line and not across lines. I have input as follows: ... (4 Replies)
Discussion started by: jamie_123
4 Replies
GLCOLOR(3G)							   OpenGL Manual						       GLCOLOR(3G)

NAME
glColor - set the current color C SPECIFICATION
void glColor3b(GLbyte red, GLbyte green, GLbyte blue); void glColor3s(GLshort red, GLshort green, GLshort blue); void glColor3i(GLint red, GLint green, GLint blue); void glColor3f(GLfloat red, GLfloat green, GLfloat blue); void glColor3d(GLdouble red, GLdouble green, GLdouble blue); void glColor3ub(GLubyte red, GLubyte green, GLubyte blue); void glColor3us(GLushort red, GLushort green, GLushort blue); void glColor3ui(GLuint red, GLuint green, GLuint blue); void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha); void glColor4i(GLint red, GLint green, GLint blue, GLint alpha); void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha); void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha); PARAMETERS
red, green, blue Specify new red, green, and blue values for the current color. alpha Specifies a new alpha value for the current color. Included only in the four-argument glColor4 commands. C SPECIFICATION
void glColor3bv(const GLbyte * v); void glColor3sv(const GLshort * v); void glColor3iv(const GLint * v); void glColor3fv(const GLfloat * v); void glColor3dv(const GLdouble * v); void glColor3ubv(const GLubyte * v); void glColor3usv(const GLushort * v); void glColor3uiv(const GLuint * v); void glColor4bv(const GLbyte * v); void glColor4sv(const GLshort * v); void glColor4iv(const GLint * v); void glColor4fv(const GLfloat * v); void glColor4dv(const GLdouble * v); void glColor4ubv(const GLubyte * v); void glColor4usv(const GLushort * v); void glColor4uiv(const GLuint * v); PARAMETERS
v Specifies a pointer to an array that contains red, green, blue, and (sometimes) alpha values. DESCRIPTION
The GL stores both a current single-valued color index and a current four-valued RGBA color. glColor sets a new four-valued RGBA color. glColor has two major variants: glColor3 and glColor4. glColor3 variants specify new red, green, and blue values explicitly and set the current alpha value to 1.0 (full intensity) implicitly. glColor4 variants specify all four color components explicitly. glColor3b, glColor4b, glColor3s, glColor4s, glColor3i, and glColor4i take three or four signed byte, short, or long integers as arguments. When v is appended to the name, the color commands can take a pointer to an array of such values. Current color values are stored in floating-point format, with unspecified mantissa and exponent sizes. Unsigned integer color components, when specified, are linearly mapped to floating-point values such that the largest representable value maps to 1.0 (full intensity), and 0 maps to 0.0 (zero intensity). Signed integer color components, when specified, are linearly mapped to floating-point values such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. (Note that this mapping does not convert 0 precisely to 0.0.) Floating-point values are mapped directly. Neither floating-point nor signed integer values are clamped to the range 0 1 before the current color is updated. However, color components are clamped to this range before they are interpolated or written into a color buffer. NOTES
The initial value for the current color is (1, 1, 1, 1). The current color can be updated at any time. In particular, glColor can be called between a call to glBegin() and the corresponding call to glEnd(). ASSOCIATED GETS
glGet() with argument GL_CURRENT_COLOR glGet() with argument GL_RGBA_MODE SEE ALSO
glColorPointer, glIndex(), glSecondaryColor() COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. AUTHORS
opengl.org opengl.org 06/10/2014 GLCOLOR(3G)
All times are GMT -4. The time now is 01:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy