Hi ,
I need to remove the 5th character of column1 and print the rest.
Can anybody give some advice?
Input:
0001c xx
0001r gg jj
0002y vv
0002p kk
0003q gg ll
0003v tt
0003t gg pp kk
Output:
0001 xx
0001 gg jj (9 Replies)
Hi I need to write a shell script which basically searches for all the empty files within the directory structure, lists them before asking the user to confirm if they would like to delete them. If the user deletes the file then a notice would appear confirming the file is deleted.
I've be... (5 Replies)
I have a text file with a few thousand lines in the format:
abcdef*ghijk*lmno
pqrs*tuv
wx*y*z
etc.
What I want to do is, get rid of everything after the SECOND asterik (the *) in each line (including the asterik). So for the example above, it would look like this after the editing:
... (11 Replies)
Hi
I am Trying to Write a script that can goto 4 different directorys on the server & remove the Files older then 30 days ??
/logs
logs1 logs2 logs3
Now I need to remove files under
logs1 logs2 logs3 which are older then 30 days whose name stat 'sit' , 'mig','bld' .
in... (3 Replies)
Hello,
I just saw that on my vps (centOS) my oscommerce with a seo script
has created millions of tmp files inside the /html/cache/ directory.
I would need to remove all those files (millions), I tried via shell but the vps
loads goes to very high and it hangs, is there some way to do a... (7 Replies)
Hi Team,
I have thousands of TIF files which are converted from PDF. Below is a sample of it.
LH9406_BLANCARAMOS_2012041812103210320001.tif
LH9406_BLANCARAMOS_2012041812103210320002.tif
LH9406_BLANCARAMOS_2012041812103210320003.tif
LH9411_ANGENIAHUTCHINSON_2012041812102510250001.tif... (9 Replies)
Hi Folks,
There is a job which generates a .zip files every day at /usr/app/generated directory , now please advise for the script that will delete this zip files permanently.but while deleting it should make sure that it will not delete the last two days recently generated zip files and this... (1 Reply)
Hi Guys,
I want to search for a specific file in a directory which have a "b" letter as the 3rd character in the name of the file.
For Example :
/abc/efg/ldbjfblkj.sh
/abc/efg/erublkd.sh
/abc/efg/eibueora.sh
/abc/efg/kfvnmnb.sh
Since we have 2 files with "b" as a 3rd character in... (5 Replies)
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Hi,
I want a simple line of code that will compress files within a directory specified (parameter) and its subdirectories and also i want to remove files which are exactly 365 days old from the sysdate after this compression.
Please help.
Thanks,
JD (8 Replies)
Discussion started by: Jesshelle David
8 Replies
LEARN ABOUT PHP
db2_escape_string
DB2_ESCAPE_STRING(3) 1 DB2_ESCAPE_STRING(3)db2_escape_string - Used to escape certain charactersSYNOPSIS
string db2_escape_string (string $string_literal)
DESCRIPTION
Prepends backslashes to special characters in the string argument.
PARAMETERS
o $string_literal
- The string that contains special characters that need to be modified. Characters that are prepended with a backslash are x00,
,
, , ', " and x1a.
RETURN VALUES
Returns $string_literal with the special characters noted above prepended with backslashes.
EXAMPLES
Example #1
A db2_escape_string(3) example
Result of using the db2_escape_string(3) function
<?php
$conn = db2_connect($database, $user, $password);
if ($conn) {
$str[0] = "All characters: x00 ,
,
, , ' , " , x1a .";
$str[1] = "Backslash (). Single quote ('). Double quote (")";
$str[2] = "The NULL character must be quoted as well";
$str[3] = "Intersting characters: x1a , x00 .";
$str[4] = "Nothing to quote";
$str[5] = 200676;
$str[6] = "";
foreach( $str as $string ) {
echo "db2_escape_string: " . db2_escape_string($string). "
";
}
}
?>
The above example will output:
db2_escape_string: All characters: ,
,
, \ , ' , " , .
db2_escape_string: Backslash (\). Single quote ('). Double quote (")
db2_escape_string: The NULL character must be quoted as well
db2_escape_string: Intersting characters: , .
db2_escape_string: Nothing to quote
db2_escape_string: 200676
db2_escape_string:
SEE ALSO db2_prepare(3).
PHP Documentation Group DB2_ESCAPE_STRING(3)