How do you check for a particular string in 1000's of files?
Please forgive my ignorance on scripting. I am trying to determine (via a script) if a certain string of characters is present . The string that I am looking for is a constant length.
Here is the string I am searching for:
I need to determine if the above string comes after this string at the beginning of the file:
So, in summary, I need to check 1000's of files for this exact match:
And then once I find a file that does NOT match the above I need to ADD the Model_Type line after the timestamp.
I'm wondering if there is also a way to keep a log as to what files where changed with a datestamp of when the script ran looking for the Model_Type string.
Last edited by Corona688; 09-25-2012 at 12:51 PM..
Say I am in /var/adm/bin and I want to search through all the various scripts and such in that directory for a string, say, xxx@yyy.com
I want to find every file with that in there and replace it with a single space.
Is that possible?
Or, is it possible to search every file and get a list... (7 Replies)
I would like to write a script that would create 1000 files like clm0001.txt to clm1000.txt. All the files would contain the same contents. How do I achieve this using a script?Please help. (2 Replies)
Hi i have a folder with 27,000 images. I need to process each image using imagemagick. I have got image magick working. I don't want to attempt to process all 27,000 images in one go and thought i would try doing it with 1000 images at a time. Is there some way i can list only the first 1000... (7 Replies)
Hi Greetings
i have 1000 files (xmlfiles) and i need to find which file contain the string over 1000 file
all file end with txt
i tried with
grep -c "string" *.txt
i am getting an error
-bash: /bin/egrep: Argument list too long
i have put an script like below
#!/bin/bash
for line... (9 Replies)
I am trying to add a single line of text to every file in a particular folder. There are thousands of files in the folder.
Each file contains this same start of the first line:
{d "%w- %d %m-, %Y - %T"} <some message here>
with the rest of the text following the second curly bracket... (10 Replies)
I have 2 text files:
cities.txt
San Francisco
Los Angeles
Seattle
Dallas
master.txt
Atlanta is chill and laid-back.
I love Los Angeles.
Coming to Dallas was the right choice.
New York is so busy!
San Francisco is fun.
Moving to Boston soon!
Go to Seattle in the summer.
... (0 Replies)
I am not able to extract/remove files older than 1000 days from a tar archive in linux system.
#!/usr/bin/perl
@file_list = `find /home/x/tmp/ -name *xxMsg* -ctime +7`;
$file_name = '/home/x/tmp/new_archive.tar';
for... (1 Reply)
I have inherited code from a former employee and I need to identify the scripts he disabled with exit 0 at the top.
After *many* trials and errors, I finally got this to work
alan@p33 => find . -name "*.ksh" -exec sh -c "head -v -n2 '{}' | tail -v -n 1 | grep -H '^exit 0'" \;
(standard... (7 Replies)
Hi, I try to explain my problem , I have a file like this:
aasdsaffsc23
scdsfsddvf46567
mionome0001.pdb
asdsdvcxvds
dsfdvcvc2324w
What I need to do is to create 1000 files in which myname line listing a sequence of numbers from 0001 to 1000. So I want to have :
nomefile0001.txt that must... (10 Replies)
I have a folder with 100s of dat files, with delimiter "|", in some files they didn't provide this delimiter. how to automatically check those list of files in a folder which doesnt have a delimiter or string this way "|" is it possible?
Thank you very much for the helpful info. (3 Replies)
Discussion started by: cplusplus1
3 Replies
LEARN ABOUT DEBIAN
glgetshadersource
GLGETSHADERSOURCE(3G) [FIXME: manual] GLGETSHADERSOURCE(3G)NAME
glGetShaderSource - Returns the source code string from a shader object
C SPECIFICATION
void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
PARAMETERS
shader
Specifies the shader object to be queried.
bufSize
Specifies the size of the character buffer for storing the returned source code string.
length
Returns the length of the string returned in source (excluding the null terminator).
source
Specifies an array of characters that is used to return the source code string.
DESCRIPTION
glGetShaderSource returns the concatenation of the source code strings from the shader object specified by shader. The source code strings
for a shader object are the result of a previous call to glShaderSource(). The string returned by the function will be null terminated.
glGetShaderSource returns in source as much of the source code string as it can, up to a maximum of bufSize characters. The number of
characters actually returned, excluding the null termination character, is specified by length. If the length of the returned string is not
required, a value of NULL can be passed in the length argument. The size of the buffer required to store the returned source code string
can be obtained by calling glGetShader() with the value GL_SHADER_SOURCE_LENGTH.
ERRORS
GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL.
GL_INVALID_OPERATION is generated if shader is not a shader object.
GL_INVALID_VALUE is generated if bufSize is less than 0.
ASSOCIATED GETS
glGetShader() with argument GL_SHADER_SOURCE_LENGTH
glIsShader()
SEE ALSO
glCreateShader(), glShaderSource()
COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. 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/.
[FIXME: source] 05/30/2012 GLGETSHADERSOURCE(3G)