Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators Want a tcl script to compare a string in a file ignoring white spaces Post 302632523 by kulua on Monday 30th of April 2012 09:42:09 AM
Old 04-30-2012
Want a tcl script to compare a string in a file ignoring white spaces

Hi ,

I want a tcl script to search a string ignoring whitespaces in a .log file . It should correctly match . The string are as follows

"Output-Maps 1 1 0 0 0" 1

and
Active Intermediate-Maps 0 0 0 1 0" 2


It should correctly match. If i change the string to
"Output-Maps 1 0 0 0 0" 1

it shouldn't match.

Please provide me the script. It's urgent.

Thanks
Kulua
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Two or more white spaces in string

Hi, Can anybody suggest me how to combine two strings with two or more white spaces and assign it to a variable? E.g. first=HAI second=HELLO third="$first $second" # appending strings with more than one white spaces echo $third this would print HAI HELLO Output appears... (2 Replies)
Discussion started by: harish_oty
2 Replies

2. UNIX for Dummies Questions & Answers

wc of characters in a file ignoring white space

Hi everyone, $ more abcdefg.ksh abcdef alpha beta gamma abcdef abcdef lmnop $ wc sachin1.ksh 5 7 132 abcdefg.ksh if you see it shows that file has got 240 characters. I actually want to count how many characters... (1 Reply)
Discussion started by: sachin.gangadha
1 Replies

3. UNIX for Dummies Questions & Answers

deleting white spaces in a file

Hello Guys, I am a newbie to unix. I am having a requirement. Please help me for finding a solution for this, I am having a file as mentioned below: $ cat shank ackca acackac akcajc akcjkcja akcj ckcklc I want to delete all the white spaces in this file, I tried... (2 Replies)
Discussion started by: mraghunandanan
2 Replies

4. Shell Programming and Scripting

File Comparison command but ignoring while spaces

Hello All, I am writing a file comparison utility and using the cmp command to compare 2file. But I need command that will compare 2 files and if the files are identical expect for differences in white spaces, then it should ignore those spaces and consider the two files equal. Is there a way to... (7 Replies)
Discussion started by: Veenak15
7 Replies

5. Solaris

removing special characters, white spaces from a field in a file

what my code is doing, it is executing a sql file and the resullset of the query is getting stored in the text file in a fixed format. for that fixed format i have used the following code:: Code: awk -F":"... (2 Replies)
Discussion started by: priyanka3006
2 Replies

6. Shell Programming and Scripting

How to remove white spaces from the beginning an end of a string in unix?

Suppose, I have a variable var=" name is ". I want to remove the blank spaces from the begining and endonly, not from the entire string. So, that the variable/string looks like following var="name is". Please look after the issue. (3 Replies)
Discussion started by: mady135
3 Replies

7. Shell Programming and Scripting

AWK - Ignoring White Space with FS

I have an AWK script that uses multiple delimiters in the FS variable. FS="+" My awk script takes a file name such as this: 12345_smith_bubba_12345_20120215_4_0.pdf and parses it out based on the under score. Each parsed field then has some code for data validation etc. This script has... (12 Replies)
Discussion started by: reno4me
12 Replies

8. UNIX for Advanced & Expert Users

Tcl script for seaching a string ignoring white spaces

Hi , I want to search a string in a file ignoring white spaces in TCL. My string is as follows Ouput-Maps " 1 1 1 0 " 1i am doing following set a *1*1*1*0* " }1 abc.log}] but it is not working. What is the wrong with the tcl script Thanks Gouranga Video... (0 Replies)
Discussion started by: mybapa3000@gmai
0 Replies

9. Shell Programming and Scripting

List and Delete Files which are older than 7 days, but have white spaces in file name

I need to list and delete all files in current older which are olderthan 7 days. But my file names have white spaces. Before deleting I want to list all the files, so that I can verify.find . -type f -mtime +7 | xargs ls -l {} But the ls command is the working on the files which have white... (16 Replies)
Discussion started by: karumudi7
16 Replies

10. Shell Programming and Scripting

Removing White spaces from a huge file

I am trying to remove whitespaces from a file containing sample data as: 457 <EOFD> Mar 1 2007 12:00:00:000AM <EOFD> Mar 31 2007 12:00:00:000AM <EOFD> system <EORD> 458 <EOFD> Mar 1 2007 12:00:00:000AM<EOFD>agf <EOFD> Apr 20 2007 9:10:56:036PM <EOFD> prodiws<EORD> . Basically these... (11 Replies)
Discussion started by: amvip
11 Replies
GLPIXELMAP(3G)															    GLPIXELMAP(3G)

NAME
glPixelMapfv, glPixelMapuiv, glPixelMapusv - set up pixel transfer maps C SPECIFICATION
void glPixelMapfv( GLenum map, GLint mapsize, const GLfloat *values ) void glPixelMapuiv( GLenum map, GLint mapsize, const GLuint *values ) void glPixelMapusv( GLenum map, GLint mapsize, const GLushort *values ) PARAMETERS
map Specifies a symbolic map name. Must be one of the following: GL_PIXEL_MAP_I_TO_I, GL_PIXEL_MAP_S_TO_S, GL_PIXEL_MAP_I_TO_R, GL_PIXEL_MAP_I_TO_G, GL_PIXEL_MAP_I_TO_B, GL_PIXEL_MAP_I_TO_A, GL_PIXEL_MAP_R_TO_R, GL_PIXEL_MAP_G_TO_G, GL_PIXEL_MAP_B_TO_B, or GL_PIXEL_MAP_A_TO_A. mapsize Specifies the size of the map being defined. values Specifies an array of mapsize values. DESCRIPTION
glPixelMap sets up translation tables, or maps, used by glCopyPixels, glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D, glCopyTexSubImage2D, glCopyTexSubImage3D, glDrawPixels, glReadPixels, glTexImage1D, glTexImage2D, glTexImage3D, glTexSubImage1D, glTexSubImage2D, and glTexSubImage3D. Additionally, if the GL_ARB_imaging subset is supported, the routines glColorTable, glColorSubTable, glConvolutionFilter1D, glConvolutionFilter2D, glHistogram, glMinmax, and glSeparableFilter2D. Use of these maps is described completely in the glPixelTransfer reference page, and partly in the reference pages for the pixel and texture image commands. Only the specification of the maps is described in this reference page. map is a symbolic map name, indicating one of ten maps to set. mapsize specifies the number of entries in the map, and values is a pointer to an array of mapsize map values. The ten maps are as follows: GL_PIXEL_MAP_I_TO_I Maps color indices to color indices. GL_PIXEL_MAP_S_TO_S Maps stencil indices to stencil indices. GL_PIXEL_MAP_I_TO_R Maps color indices to red components. GL_PIXEL_MAP_I_TO_G Maps color indices to green components. GL_PIXEL_MAP_I_TO_B Maps color indices to blue components. GL_PIXEL_MAP_I_TO_A Maps color indices to alpha components. GL_PIXEL_MAP_R_TO_R Maps red components to red components. GL_PIXEL_MAP_G_TO_G Maps green components to green components. GL_PIXEL_MAP_B_TO_B Maps blue components to blue components. GL_PIXEL_MAP_A_TO_A Maps alpha components to alpha components. The entries in a map can be specified as single-precision floating-point numbers, unsigned short integers, or unsigned long integers. Maps that store color component values (all but GL_PIXEL_MAP_I_TO_I and GL_PIXEL_MAP_S_TO_S) retain their values in floating-point , with unspecified mantissa and exponent sizes. Floating-point values specified by glPixelMapfv are converted directly to the internal floating- point of these maps, then clamped to the range [0,1]. Unsigned integer values specified by glPixelMapusv and glPixelMapuiv are converted linearly such that the largest representable integer maps to 1.0, and 0 maps to 0.0. Maps that store indices, GL_PIXEL_MAP_I_TO_I and GL_PIXEL_MAP_S_TO_S, retain their values in fixed-point , with an unspecified number of bits to the right of the binary point. Floating-point values specified by glPixelMapfv are converted directly to the internal fixed-point of these maps. Unsigned integer values specified by glPixelMapusv and glPixelMapuiv specify integer values, with all 0's to the right of the binary point. The following table shows the initial sizes and values for each of the maps. Maps that are indexed by either color or stencil indices must have mapsize = 2n for some n or the results are undefined. The maximum allowable size for each map depends on the implementation and can be determined by calling glGet with argument GL_MAX_PIXEL_MAP_TABLE. The single maximum applies to all maps; it is at least 32. ------------------------------------------------------------------------------------- map Lookup Index Lookup Value Initial Size Initial Value ------------------------------------------------------------------------------------- GL_PIXEL_MAP_I_TO_I color index color index 1 0 GL_PIXEL_MAP_S_TO_S stencil index stencil index 1 0 GL_PIXEL_MAP_I_TO_R color index R 1 0 GL_PIXEL_MAP_I_TO_G color index G 1 0 GL_PIXEL_MAP_I_TO_B color index B 1 0 GL_PIXEL_MAP_I_TO_A color index A 1 0 GL_PIXEL_MAP_R_TO_R R R 1 0 GL_PIXEL_MAP_G_TO_G G G 1 0 GL_PIXEL_MAP_B_TO_B B B 1 0 GL_PIXEL_MAP_A_TO_A A A 1 0 ------------------------------------------------------------------------------------- ERRORS
GL_INVALID_ENUM is generated if map is not an accepted value. GL_INVALID_VALUE is generated if mapsize is less than one or larger than GL_MAX_PIXEL_MAP_TABLE. GL_INVALID_VALUE is generated if map is GL_PIXEL_MAP_I_TO_I, GL_PIXEL_MAP_S_TO_S, GL_PIXEL_MAP_I_TO_R, GL_PIXEL_MAP_I_TO_G, GL_PIXEL_MAP_I_TO_B, or GL_PIXEL_MAP_I_TO_A, and mapsize is not a power of two. GL_INVALID_OPERATION is generated if glPixelMap is executed between the execution of glBegin and the corresponding execution of glEnd. ASSOCIATED GETS
glGetPixelMap glGet with argument GL_PIXEL_MAP_I_TO_I_SIZE glGet with argument GL_PIXEL_MAP_S_TO_S_SIZE glGet with argument GL_PIXEL_MAP_I_TO_R_SIZE glGet with argument GL_PIXEL_MAP_I_TO_G_SIZE glGet with argument GL_PIXEL_MAP_I_TO_B_SIZE glGet with argument GL_PIXEL_MAP_I_TO_A_SIZE glGet with argument GL_PIXEL_MAP_R_TO_R_SIZE glGet with argument GL_PIXEL_MAP_G_TO_G_SIZE glGet with argument GL_PIXEL_MAP_B_TO_B_SIZE glGet with argument GL_PIXEL_MAP_A_TO_A_SIZE glGet with argument GL_MAX_PIXEL_MAP_TABLE SEE ALSO
glColorTable(3G), glColorSubTable(3G), glConvolutionFilter1D(3G), glConvolutionFilter2D(3G), glCopyPixels(3G), glCopyTexImage1D(3G), glCopyTexImage2D(3G), glCopyTexSubImage1D(3G), glCopyTexSubImage2D(3G), glDrawPixels(3G), glHistogram(3G), glMinmax(3G), glPixelStore(3G), glPixelTransfer(3G), glReadPixels(3G), glSeparableFilter2D(3G), glTexImage1D(3G), glTexImage2D(3G), glTexImage3D(3G), glTexSubImage1D(3G), glTexSubImage2D(3G), glTexSubImage3D(3G) GLPIXELMAP(3G)
All times are GMT -4. The time now is 11:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy