---------- Post updated at 02:56 PM ---------- Previous update was at 02:51 PM ----------
is there something wrong in above...? cause earlier i used to do
it was working fine but when i added '|' to it which i thought would be similiar syntax to awk, the above statement is not functioning properly
Is there any way to do case insensitive search with awk for the below statement:
month1=`awk '/month/' ${trgfile} | cut -d"=" -f2`
the "month" could come as Month, mOnth,MONTH etc. in a file.
Now I am looking for "month"....
Thanks,
AC (4 Replies)
i have something like this in a file
cat onlytables.sql
create table NextID (
id int auto_increment,
zoneID int,
entityName varchar(64),
nextID int,
lastModified TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
primary... (6 Replies)
I am using a variable called $variable in a pattern search to print from a starting variable to a constant value. the variable search should be case in sensitive.
i tired using Ip at the end in the below command. but in ksh it is not working.
sed -n "/$variable/,/constant/p" file
i also... (11 Replies)
I have an encrypted password file, and I've created a simple script to search the password file for a particular record. There are multiple lines per record, so I'm using a record delimiter.
#!/bin/bash
PATTERN=$1
openssl des3 -d -salt -in ~/docs/pass.des3 | awk '{ FS="\n" ; RS="*" }... (2 Replies)
Dears,
In the below string, please let me know how to make the sed search case-incensitive. I have more such lines in my script instead of let me know any other easier option.
sed -n '/dn: MSISDN=/,/^\s*$/p' full.ldif > temp ; sed -n... (4 Replies)
Hello ,
Using the below scrip to search a string in a file , by case-insensitively
Please assist on using the toupper() as getting error !.
#!/usr/bin/ksh
set -x
curr_dir=`pwd`
file_ctr=0
printf "\n Reviewing the output file from the directory: %s \n\n" $curr_dir
ls -latr ... (4 Replies)
Discussion started by: Siva SQL
4 Replies
LEARN ABOUT PHP
dbx_escape_string
DBX_ESCAPE_STRING(3) 1 DBX_ESCAPE_STRING(3)dbx_escape_string - Escape a string so it can safely be used in an sql-statementSYNOPSIS
string dbx_escape_string (object $link_identifier, string $text)
DESCRIPTION
Escape the given string so that it can safely be used in an sql-statement.
PARAMETERS
o $link_identifier
- The DBX link object returned by dbx_connect(3)
o $text
- The string to escape.
RETURN VALUES
Returns the text, escaped where necessary (such as quotes, backslashes etc). On error, NULL is returned.
EXAMPLES
Example #1
dbx_escape_string(3) example
<?php
$link = dbx_connect(DBX_MYSQL, "localhost", "db", "username", "password")
or die("Could not connect");
$text = dbx_escape_string($link, "It's quoted and backslashed (\).");
$result = dbx_query($link, "insert into tbl (txt) values ('" . $text . "')");
if ($result == 0) {
echo dbx_error($link);
}
dbx_close($link);
?>
SEE ALSO dbx_query(3).
PHP Documentation Group DBX_ESCAPE_STRING(3)