11-30-2007
sed related query
Hi
I have a file which looks like this
//string = "abcd"; //info
//string = "*pqrs"; //add
string = "#123"; //sub
//string = "#1234567890"
data = check(string)
//string = "#1234567890"
I want to modify this as
string = "#987"; //mult
data = check(string)
How do i do that?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi All
Why is #!/bin/sh being used in most of the ksh scripts......?
I have seen this (#!/bin/sh) being used at the start of the script
Regards
Suresh (2 Replies)
Discussion started by: sureshg_sampat
2 Replies
2. Shell Programming and Scripting
Hi
I have an input to a file. I want the script to return it formatted
the input is a number, say ,
1234567895 and the output should be 21 43 65 87 59 ,ie, the pair of two digits should be reversed.
How can I do this using a shell script? (1 Reply)
Discussion started by: gopsman
1 Replies
3. UNIX for Dummies Questions & Answers
hi,
I have to extract a column from a file and then updated that column..??
Now i can use wak for extracting it and then how to update it..
$ awk' {print $5}' input_file
Can i use sed command here piping it to the output from the awk command.. (2 Replies)
Discussion started by: abhisek.says
2 Replies
4. Shell Programming and Scripting
i Am using the below query and printing the $8 and $9 filed..
find /A/B/C/{1,3,5,7} -name "*.txt" -o -name "*.csv" -o -name "*.TXT" -o -name "*.dat" |xargs ls -ltr |awk '{print $8 ,$9}' > result.xls
this give me the rsult like below..
2008/home/ADMIN/om/1.txt
2008/home/ADMIN/om/hi.txt
... (1 Reply)
Discussion started by: sapan123
1 Replies
5. Shell Programming and Scripting
wht does below statement mean?
if
wht does dis -d option do??
TIA. (1 Reply)
Discussion started by: sainathdeg
1 Replies
6. Solaris
Hi friends,
1.From the information I gathered, an inode is an object which has a number associated with it... and when a slice is partitioned, inodes with their numbers are created.
When a file is created, an inode number is assigned to it. This could be viewed through ls -i <dir/file>... (4 Replies)
Discussion started by: saagar
4 Replies
7. Shell Programming and Scripting
Hi all,
I have put a query in a thread but didn't get any reply. Hoping to get a reply here.
I have a file in that one line resembles like below...
Forwarded by Deepak on 11/15/2009 10:28 AM EST
ofcourse AM can be PM also...
so what i need is first i need to get only... (1 Reply)
Discussion started by: smarty86
1 Replies
8. UNIX for Dummies Questions & Answers
I am executing the ls command to show the contents of a folder,
it shows some number in front of word total as highlighted in blue color below quotes.
Can anyone please share that what it is? (2 Replies)
Discussion started by: Zaib
2 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
The result for 'grep "cert_codes" /develop/sales/appl.srce/*.4gl' command will be saved at aa.txt
grep "cert_codes" /develop/sales/appl.srce/*.4gl >aa.txt
But I am not sure, whether, all result stored in .txt file in case of multi-line result.
Please revert back if... (2 Replies)
Discussion started by: pbankar
2 Replies
10. Emergency UNIX and Linux Support
I need to list the interfaces that uses FTP instead of SFTP on my applications that are on AIX servers. How do I get that list of IP addresses that connect to my applications via FTP? (2 Replies)
Discussion started by: ggayathri
2 Replies
MYSQLI(3) 1 MYSQLI(3)
The mysqli class
INTRODUCTION
Represents a connection between PHP and a MySQL database.
CLASS SYNOPSIS
mysqli
mysqli
Properties
o
int$mysqli->affected_rows
o
string$mysqli->client_info
o
int$mysqli->client_version
o
int$mysqli->connect_errno
o
string$mysqli->connect_error
o
int$mysqli->errno
o
array$mysqli->error_list
o
string$mysqli->error
o
int$mysqli->field_count
o
int$mysqli->client_version
o
string$mysqli->host_info
o
string$mysqli->protocol_version
o
string$mysqli->server_info
o
int$mysqli->server_version
o
string$mysqli->info
o
mixed$mysqli->insert_id
o
string$mysqli->sqlstate
o
int$mysqli->thread_id
o
int$mysqli->warning_count
Methods
o
mysqli::__construct ([string $host = ini_get("mysqli.default_host")], [string $username = ini_get("mysqli.default_user")], [string
$passwd = ini_get("mysqli.default_pw")], [string $dbname = ""], [int $port = ini_get("mysqli.default_port")], [string $socket =
ini_get("mysqli.default_socket")])
o
bool mysqli::autocommit (bool $mode)
o
bool mysqli::change_user (string $user, string $password, string $database)
o
string mysqli::character_set_name (void )
o
bool mysqli::close (void )
o
bool mysqli::commit ([int $flags], [string $name])
o
bool mysqli::debug (string $message)
o
bool mysqli::dump_debug_info (void )
o
object mysqli::get_charset (void )
o
string mysqli::get_client_info (void )
o
bool mysqli::get_connection_stats (void )
o
mysqli_warning mysqli::get_warnings (void )
o
mysqli mysqli::init (void )
o
bool mysqli::kill (int $processid)
o
bool mysqli::more_results (void )
o
bool mysqli::multi_query (string $query)
o
bool mysqli::next_result (void )
o
bool mysqli::options (int $option, mixed $value)
o
bool mysqli::ping (void )
o publicstatic int mysqli::poll (array &$read, array &$error, array &$reject, int $sec, [int $usec])
o
mysqli_stmt mysqli::prepare (string $query)
o
mixed mysqli::query (string $query, [int $resultmode = MYSQLI_STORE_RESULT])
o
bool mysqli::real_connect ([string $host], [string $username], [string $passwd], [string $dbname], [int $port], [string $socket],
[int $flags])
o
string mysqli::escape_string (string $escapestr)
o
bool mysqli::real_query (string $query)
o public mysqli_result mysqli::reap_async_query (void )
o public bool mysqli::refresh (int $options)
o
bool mysqli::rollback ([int $flags], [string $name])
o
int mysqli::rpl_query_type (string $query)
o
bool mysqli::select_db (string $dbname)
o
bool mysqli::send_query (string $query)
o
bool mysqli::set_charset (string $charset)
o
bool mysqli::set_local_infile_handler (mysqli $link, callable $read_func)
o
bool mysqli::ssl_set (string $key, string $cert, string $ca, string $capath, string $cipher)
o
string mysqli::stat (void )
o
mysqli_stmt mysqli::stmt_init (void )
o
mysqli_result mysqli::store_result ([int $option])
o
mysqli_result mysqli::use_result (void )
PHP Documentation Group MYSQLI(3)