03-26-2008
How do I insert x'0D' ?
I'm directing output to a *.dat file. The first byte is a variable, the second must be a carriage-return (x'0D'). Is there a UNIX equivalent of an ASCII command that will allow me to output this byte?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear friends,
I have a dataset like this
2.18 66.86 27.9
2.18 66.86 27.9
2.18 66.86 27.9
2.15 66.88 27.9
2.15 66.88 27.9
Now i have another dataset containing date coloum like this
22-12-2005
22-12-2005
22-12-2005
22-12-2005
22-12-2005
Now i want to... (3 Replies)
Discussion started by: rajan_ka1
3 Replies
2. Solaris
Hi All,
I enhanced a perl script that creates a table with xyz_yyyymm and insert data from xyz table before truncate xyz.I have tested it successfully in dev but when i ran it on production new table xyz_yyyymm created but did not insert any records from xyz.(No errors were thrown)The perl... (1 Reply)
Discussion started by: megh
1 Replies
3. Shell Programming and Scripting
Can anyone help.
I have sql to CSV showing header with ALIAS names but I want to generate CSV file with user friendly name i.e from AIAN8 to Adress Book Number etc.
SELECT AIAN8 || , || F0101.ABALPH || , || AICO ||
showing following below in CSV output intead of above
Address... (4 Replies)
Discussion started by: s1a2m3
4 Replies
4. Shell Programming and Scripting
Hi,
I've written a script to interrogate all fibre devices on our systems and output the WWNs to a file. I now want to insert a ":" every 2 characters into the WWN so I can write another script to create aliases within the SAN.
So the current file has WWNs in the following format;... (2 Replies)
Discussion started by: h8mmer
2 Replies
5. Shell Programming and Scripting
Hello...I'm here again.
This is the situation
I want check if exist text between two lines:
Example:
interface
description --text to verify
ip adress
if not exists text between 'interface' and 'ip address' i want insert the word 'no description'
interface
no description --if not... (4 Replies)
Discussion started by: bobbasystem
4 Replies
6. Shell Programming and Scripting
Hi All
I got one problem and want your help,what i want to do is
Input
123 key0=A;B;C;:key1=X;Y;Z;:
here 123 is a username
I should search the username (in this case it is 123) in file and if found it should insert the additional string D as below
Here 123 and key are tab seperated
... (6 Replies)
Discussion started by: parthmittal2007
6 Replies
7. UNIX for Dummies Questions & Answers
my file looks like this:
297 PC Closed 07/10/12 999000098 AMERICAN SOCIETY FOR HEALTHCAR 0.00 USD 1 NAI
i want to look line this:
297,PC,Closed,07/10/12,999000098,AMERICAN SOCIETY FOR HEALTHCAR,0.00,USD,1,NAI (4 Replies)
Discussion started by: lawsongeek
4 Replies
8. Linux
How can I insert End of line (EOL) in Unix to file. Thanks (5 Replies)
Discussion started by: mrn6430
5 Replies
9. UNIX for Dummies Questions & Answers
Hello
Is there any sed command to insert a line after nth line... have a file of 500000 lines
Thanks (4 Replies)
Discussion started by: Madiouma Ndiaye
4 Replies
LEARN ABOUT PHP
mongodb.lasterror
MONGODB.LASTERROR(3) 1 MONGODB.LASTERROR(3)
MongoDB::lastError - Check if there was an error on the most recent db operation performed
SYNOPSIS
public array MongoDB::lastError (void )
DESCRIPTION
This method is equivalent to:
<?php
public function lastError() {
return $this->command(array('getlasterror' => 1));
}
?>
PARAMETERS
This function has no parameters.
RETURN VALUES
Returns the error, if there was one.
EXAMPLES
Example #1
MongoDB.lastError(3) NULL error example
<?php
$db->resetError();
var_dump($db->lastError());
?>
The above example will output something similar to:
array(3) {
["err"]=>
NULL
["n"]=>
int(0)
["ok"]=>
float(1)
}
Example #2
MongoDB.lastError(3) duplicate key example
<?php
$c = $db->selectCollection("foo");
// insert two documents with the same _id
$c->insert(array("_id" => 1));
$c->insert(array("_id" => 1));
var_dump($db->lastError());
?>
The above example will output something similar to:
array(3) {
["err"]=>
string(64) "E11000 duplicate key errorindex: foo.foo.$_id_ dup key: { : 1 }"
["n"]=>
int(0)
["ok"]=>
float(1)
}
PHP Documentation Group MONGODB.LASTERROR(3)