I already know about conjoining strings and this is the way 'set' does it from the working part of the code:
But I did say I would like to be able to edit the STRING on the fly so what if I deleted say ' or " inside the STRING?
EDIT:
Just seen your edit and that looks like a good idea thanks I'll try it...
Last edited by wisecracker; 04-12-2020 at 07:42 AM..
Reason: See EDIT:
Dear all,
I want below data to make it in column format.so i will see the data like this
cdrID teleServiceCode chargedPartyNumber ... ... ... ...
"egmailcom0w10ggzx00" 'sMS (5)' "716323770"
"m17ifi5z30w0z6o7200" 'sMS (5)' ... (7 Replies)
Hello all,
I have a string var which contains formatting characters at the end, it is a string with EScape sequences at the end of it.
How can I remove them so that I only keep the 'real' text?
I tried :
var1=${var1%%\033[0m}
does not seem to do the job ....
Please help
Thanks (2 Replies)
I want it to ouput "abcd", but it dosen't.
1 #include<stdio.h>
2 int main()
3 {
4 printf("a\x62cd");
5 }
6
gcc alarm.c -o alarm
alarm.c: In function 'main':
alarm.c:4:9: warning: hex escape sequence out of range
It seems that the complier joint "cd" as part of... (8 Replies)
I tried to parse data from switch configuration files
vlan 1727 name SQ5506-15 by port
tagged ethe 8/1 to 8/2
untagged ethe 1/13
!
vlan 2105 name SQ5620-7007(BR2) by port
tagged ethe 8/1 to 8/2
untagged ethe 1/17
!
interface ethernet 1/13
port-name SQ5506-15.nic0
rate-limit... (2 Replies)
How to store escape character in the variable.
Var=abc,def,ghi,jkl
echo ${Var} | sed -e "s/,/|\\\\./g;s/^/\\\\./g"
\.abc|\.def|\.ghi|\.hjk
Var1=`echo ${Var} | sed -e "s/,/|\\\./g;s/^/\\\./g"`
Actual:
-------
echo $Var1
.abc|.def|.ghi|.jkl
Expected:
---------
echo $Var1... (4 Replies)
Hi,
I am trying to read an Oracle listener log file line by line and need to separate the lines into several fields. The field delimiter for the line happens to be an asterisk.
I have the script below to start with but when running it, the echo command is globbing it to include other... (13 Replies)
Hello,
Below script works fine when I manually enter required information for each file. When it comes to shell in auto mode, it gives various errors.
I am under ubuntu 14.04 / trusty.
manual_run.sh:
#!/bin/bash
/usr/bin/ffmpeg -start_at_zero -copyts -i nicki.mp4 -c:v mpeg2video \
-b:v 500k... (3 Replies)
Debian 9 64x - LXDE
How can i disable escape sequences in a variable?
#!/bin/bash
#mainscript
. "./links.bash"
echo "$red_start This text should be red $color_end"#!/bin/bash
#links.bash
#colors
red_start="\eOutput that i get:
\e
Output expected:
This text should be... (5 Replies)
Discussion started by: int3g3r
5 Replies
LEARN ABOUT PHP
cubrid_real_escape_string
CUBRID_REAL_ESCAPE_STRING(3) 1 CUBRID_REAL_ESCAPE_STRING(3)cubrid_real_escape_string - Escape special characters in a string for use in an SQL statementSYNOPSIS
string cubrid_real_escape_string (string $unescaped_string, [resource $conn_identifier])
DESCRIPTION
This function returns the escaped string version of the given string. It will escape the following characters: '. In general, single quo-
tations are used to enclose character string. Double quotations may be used as well depending on the value of ansi_quotes, which is a
parameter related to SQL statement. If the ansi_quotes value is set to no, character string enclosed by double quotations is handled as
character string, not as an identifier. The default value is yes. If you want to include a single quote as part of a character string,
enter two single quotes in a row.
PARAMETERS
o $unescaped_string
-The string that is to be escaped.
o $conn_identifier
- The CUBRID connection. If the connection identifier is not specified, the last connection opened by cubrid_connect(3) is
assumed.
RETURN VALUES
Escaped string version of the given string, on success.
FALSE on failure.
EXAMPLES
Example #1
cubrid_real_escape_string(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$unescaped_str = ' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~';
$escaped_str = cubrid_real_escape_string($unescaped_str);
$len = strlen($unescaped_str);
@cubrid_execute($conn, "DROP TABLE cubrid_test");
cubrid_execute($conn, "CREATE TABLE cubrid_test (t char($len))");
cubrid_execute($conn, "INSERT INTO cubrid_test (t) VALUES('$escaped_str')");
$req = cubrid_execute($conn, "SELECT * FROM cubrid_test");
$row = cubrid_fetch_assoc($req);
var_dump($row);
cubrid_close_request($req);
cubrid_disconnect($conn);
?>
The above example will output:
array(1) {
["t"]=>
string(95) " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
}
PHP Documentation Group CUBRID_REAL_ESCAPE_STRING(3)