I have a set of free-form phone numbers that are not uniform and I want to reformat them into a standard uniform string. These are embedded at the end of a colon seperated file built by a large nawk + tr piping like such:
Note: Row 1 & 3 are extensions that would come out to 444-444-4444 & 666-666-6666 from an outside line respectively. So the output would need to be:
Is there a way to build a template with arrays or something similar. I have tried several things with awk and IFS, but can't seem to adequately break up these into array's by each byte. Solving this is step 1.
Step 2 is how do I incorporate this solution into a 3 step piping so that only 1 file is created during the script. No temporary files allowed. So it would need to occur like this:
Is this the best way to approach this? I don't want to do nawk + "tr" to remove whitespace and create output.txt, then come back through and do the phone number solution on output.txt to create new_output.txt. It all needs to be done in one swoop without the temp file unless you can rewrite the new phone number to the output.txt file after its generated.
Hello, I am having a trouble with awk attempting to reformat a two columns file , such as below:
201 84
201 370
201 544
201 600
213 99
213 250
213 431
220 65
220 129
220 338
220 408
220 501
220 550
231 101
231 350
What I need to do is is to add a third column containing a... (4 Replies)
looking to do the following...
What the data looks like
server1 02/01/2008 groups 10
server1 03/01/2008 groups 15
server1 04/01/2008 groups 20
server2 02/01/2008 users 50
server2 03/01/2008 users 75
server2 04/01/2008 users 100
server2 04/01/2008 users 125
What I would like the... (1 Reply)
Dear users,
I am new to AWK and have been battling with this one for close to a week now. Some of you did offer some help last week but I think I may not have explained myself very well. So I am trying again.
I have a dataset that has the following format where the datasets repeat every... (5 Replies)
Hello,
I've a lot of ascii files that I would like to reformat :
One of files's column (for exemple $5) contains increasing numbers (see exemple) :
$5=
1
1
1
1
1
2
2
2
2
3
3 (2 Replies)
I have a bif text file with the following format:
d1_03 fr:23
d1_03 fr:56
d1_03 fr:67
d1_03 fr:78
d1_01 fr:35
d1_01 fr:29
d1_01 fr:45
d2_09 fr:34
d2_09 fr:78
d3_98 fr:90
d3_98 fr:104
d3_98 fr:360
I have like thousands of such lines
I want to reformat this file based on column 1... (3 Replies)
Hi i have a unix date in file a file like this '1313675999'
in oracle i would do it like this
select TO_CHAR ( TO_DATE ('01011970', 'DDMMYYYY')+ 1 / 24 / 60 / 60 * 1313675999,'YYYYMMDD') from dual how to achive the same in unix ? (8 Replies)
Hi Guys,
I have a source file which contains significant strings amongst a lot of dross in non-uniform format, I'd like to search the input file for any examples of data from my reference file, and then output any matches to a list (text file).
I've made something that achieves this, it's... (4 Replies)
Hi,
Is there any advantage is making all my storage LUNS ( hdisk ) of uniform size. Currently the LUN's are having different size () eg: 50G / 60G / 75G etc ).
I am planning for a storage migration....so should i go for uniform lun size or with current LUN size pattern ?
Regards,
jibu (3 Replies)
Hello,
I am running a script which sends an output as an email; I am having issues with the spacing being not uniform in the message. Snippet of the code and email message below:
if ] then echo "$Hostname\tMISSING\tHMCBackup" >> $BackupMsg
else if ] then echo... (12 Replies)
Discussion started by: hasn318
12 Replies
LEARN ABOUT OSX
gluniformblockbinding
GLUNIFORMBLOCKBINDIN(3G) OpenGL 3.3 GLUNIFORMBLOCKBINDIN(3G)NAME
glUniformBlockBinding - assign a binding point to an active uniform block
C SPECIFICATION
void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
PARAMETERS
program
The name of a program object containing the active uniform block whose binding to assign.
uniformBlockIndex
The index of the active uniform block within program whose binding to assign.
uniformBlockBinding
Specifies the binding point to which to bind the uniform block with index uniformBlockIndex within program.
DESCRIPTION
Binding points for active uniform blocks are assigned using glUniformBlockBinding. Each of a program's active uniform blocks has a
corresponding uniform buffer binding point. program is the name of a program object for which the command glLinkProgram() has been issued
in the past.
If successful, glUniformBlockBinding specifies that program will use the data store of the buffer object bound to the binding point
uniformBlockBinding to extract the values of the uniforms in the uniform block identified by uniformBlockIndex.
When a program object is linked or re-linked, the uniform buffer object binding point assigned to each of its active uniform blocks is
reset to zero.
ERRORS
GL_INVALID_VALUE is generated if uniformBlockIndex is not an active uniform block index of program.
GL_INVALID_VALUE is generated if uniformBlockBinding is greater than or equal to the value of GL_MAX_UNIFORM_BUFFER_BINDINGS.
GL_INVALID_VALUE is generated program is not the name of a program object generated by the GL.
NOTES
glUniformBlockBinding is available only if the GL version is 3.1 or greater.
ASSOCIATED GETS
glGetActiveUniformBlock() with argument GL_UNIFORM_BLOCK_BINDING
SEE ALSO
glLinkProgram(), glBindBufferBase(), glBindBufferRange(), glGetActiveUniformBlock()
COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication
License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
OpenGL 3.3 03/08/2011 GLUNIFORMBLOCKBINDIN(3G)