hi all ,
i want a command that interacts with the input of a user .
i.e.
i want it to serch a file for the first occurance of a variable and replace the value that is after the equal sign .
for example :
my file contains a varible that is $HOME=/home
i want to search for variable $HOME... (4 Replies)
I have an xml file with following tags
<NewTag>value123</xyz>
<NewTag>value321</abcd>
I have to replace the values in between the tags with some value ( VAL1/VAL2)
but the thing the ending tag can be any thing, for this i need a awk command
currently i am using this but it... (5 Replies)
Hi all,
I need help in replacing awk with sed for the below.
1 ) cat list | awk -F" |," '/MATH/ {sub(/]*/,"",$3); print $3}'
Eg: file : list
Sno Subno Name
1 SUB1 ENG
2 SUB2 MATH
2)
Eg:result
Total No of Students: 2
Sno ID Sub
------------------
1 ... (3 Replies)
hi
i am using awk for first time so i am having issue
is it the correct way of using
Y here is variable which i fetch using grep from file
awk -v X={$Y}
{
if ($0 ~ /X/ ) { sub (out.*/,"out1",$0) }
print 0
}, filename > temp
when i look into temp file i dont see any replacement... (9 Replies)
Hello everyone,
I have a problem with awk replacement... I need to replace "|\n" for "\n"
I tried thisawk '{ sub(/\|\\n/, "\\n"); print }'
but it seems like it doesn't work properly. Can anyone help with that? (4 Replies)
I been trying to figure out how to use element of array as a replacement pattern. This works as I expected:
$ echo "one two three" | awk '{
gsub(/wo/,"_BEG_&_END_",$2);
print }'
one t_BEG_wo_END_ three
$ echo "one two three" | awk '{
tmp="foo";
gsub(/wo/,"_BEG_" tmp "_END_",$2);... (5 Replies)
Hi,
I have a file where I want to replace the 15th field separated by comma, only on specific lines matching lots of different conditions.
I have managed to read the file line by line, within the loop my line is held in a variable called $line
I assume this will be using sed (maybe... (5 Replies)
Hi All,
I am trying to replace the variable in the file after the particular match string. It is being replaced if i hardcode the value and with use of "&" with sed.
sed -e "s/URL./& http:\\localhost:7223/g"
But when am trying to pass the variable it is failing. I tried multiple... (9 Replies)
Hi,,
I have the line below in a file:
$!VarSet |LFDSFN1| = '"E:\APC\Trials\20140705_427_Prototype Trial\Data\T4_20140705_Trial_Cycle_Data_13_T_Norm.txt" "VERSION=100 FILEEXT=\"*.txt\" FILEDESC=\"General Text\" "+""+"TITLE{SEARCH=NONE NAME=\"New Dataset\" LINE=1I want to write a script to change... (2 Replies)
Dear all,
I have a "SQL request" in a file: that request include different "host variable" and I would like to substitute the different "host variable" by their respective content before executing the request.
For example:
$ echo $SHELL
/bin/bash
$ cat dae2.txt
DELETE FROM ... (11 Replies)
Discussion started by: dae
11 Replies
LEARN ABOUT PHP
cubrid_version
CUBRID_VERSION(3) 1 CUBRID_VERSION(3)cubrid_version - Get the CUBRID PHP module's versionSYNOPSIS
string cubrid_version (void )
DESCRIPTION
The cubrid_version(3) function is used to get the CUBRID PHP module's version.
PARAMETERS
This function has no parameters.
RETURN VALUES
Version information (eg. "8.3.1.0001").
EXAMPLES
Example #1
cubrid_version(3) example
<?php
printf("%-30s %s
", "CUBRID PHP Version:", cubrid_version());
printf("
");
$conn = cubrid_connect("localhost", 33088, "demodb", "dba");
if (!$conn) {
die('Connect Error ('. cubrid_error_code() .')' . cubrid_error_msg());
}
$db_params = cubrid_get_db_parameter($conn);
while (list($param_name, $param_value) = each($db_params)) {
printf("%-30s %s
", $param_name, $param_value);
}
printf("
");
$server_info = cubrid_get_server_info($conn);
$client_info = cubrid_get_client_info();
printf("%-30s %s
", "Server Info:", $server_info);
printf("%-30s %s
", "Client Info:", $client_info);
printf("
");
$charset = cubrid_get_charset($conn);
printf("%-30s %s
", "CUBRID Charset:", $charset);
cubrid_disconnect($conn);
?>
The above example will output:
CUBRID PHP Version: 9.1.0.0001
PARAM_ISOLATION_LEVEL 3
LOCK_TIMEOUT -1
MAX_STRING_LENGTH 1073741823
PARAM_AUTO_COMMIT 1
Server Info: 9.1.0.0212
Client Info: 9.1.0
CUBRID Charset: iso8859-1
SEE ALSO cubrid_error_code(3), cubrid_error_code_facility(3).
PHP Documentation Group CUBRID_VERSION(3)