I have data in a CSV file that looks like;
I'm running the following;
It gives me the following error for each data line;
If I echo the line it prints fine and if I manually type what was echoed it works fine. It appears that when running in the "while" loop it wants the data in floating point? The "$a" variable works fine and if I replace the "$b" variable with a U for undefined the script will work. I've tried several things, even just using one read variable, still doesn't work.
Anyone got any ideas?
Last edited by Franklin52; 11-23-2012 at 03:13 AM..
Reason: Please use code tags for data and code samples
Hi all,
Till now i was able to do apt-get update. but today i started to the following error:
# apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (2 No such file or directory)
E: Unable to lock the list directory
#
Could any one let me know how to solve it.
... (1 Reply)
Dear All,
I have writen a Pro*c program that does a data base select,insert,update statements and I have scheduled the program to run from crontab,
It is runing fine for the select insert and commit statement till it reaches the update statement , it throws the following error:
SQL On IPB... (2 Replies)
Hi,
I have a oracle source with a field my_date =06/02/2009
I am trying to update the table to SYSDATE with a myscript.sql where I have
UPDATE table set my_date=to_DATE(SYSDATE,'MM/DD/YYYY');
Now I try to run it with myupdate.SH script where I have
sqlplus nolog @myscript.sql
... (4 Replies)
Hello
I reinstalled my OS today and after going through the registration the updatemanager pops up, as expected. The problem is all i get is an error message box that's completely blank.
The icon in the sytem tray is a blue question mark and when hovering over it, it says i'm not... (4 Replies)
Hi guys,
im having real difficulty getting my head around perl and rrdtool and was hoping someone could help
I want to run a perl script from cron which retrieves the data every 5 mins, creates .rrd's if not already created, and updates the DS from the reultsHash or $key, then creates the... (2 Replies)
Hello,
I have registered an SLES11SP1 server with my spacewalk server however when I perform a 'yum repolist', I do not see my spacewalk server as one of the available repositories. So when I perform yum update (any-package), it does not find an update available. HOwever within the Spacewalk GUI... (3 Replies)
Hello all,
Not sure if this question has been answered already.
I have some xml Element variable as below:
child19 = core_elem_dcache.find('stat')
child20 = core_elem_dcache.find('stat')
child21 = core_elem_dcache.find('stat')
child22 = core_elem_dcache.find('stat'Next I... (2 Replies)
Hello all,
I would like to unzip some files with a for-loop.
Is there anyone who could tell me how I should do this - in a correct way?
for file in $(ls); do echo gzip -d < $file | tar xf -; done
The problem is the pipe - I believe. But how could I do it? I need it for the command... (4 Replies)
I have this code that gives this error on Linux and will be grateful if you can help
import rrdtool
try:
ret_asd = rrdtool.update(myfile.rrd,'N:%s:%s' %(metric1, metric2));
except rrdtool.error, e:
print e
When i run the above i get the below error
except... (1 Reply)
Im trying to update an informix database table for each occurance of a head_barcode in a file called mw within a for loop
please see below - cant get the syntax correct. any help please?
for a in `cat /tmp/mw`
do
sql image - << STOP > /dev/null 2>&1
update doc_table set status =... (4 Replies)
Discussion started by: worky
4 Replies
LEARN ABOUT PHP
msgfmt_parse_message
MSGFMT_PARSE_MESSAGE(3) 1 MSGFMT_PARSE_MESSAGE(3)MessageFormatter::parseMessage - Quick parse input string
Object oriented style
SYNOPSIS
publicstatic array MessageFormatter::parseMessage (string $locale, string $pattern, string $source)
DESCRIPTION
Procedural style
array msgfmt_parse_message (string $locale, string $pattern, string $value)
Parses input string without explicitly creating the formatter object. Use this function when the format operation is done only once and
does not need and parameters or state to be kept.
PARAMETERS
o $locale
- The locale to use for parsing locale-dependent parts
o $pattern
- The pattern with which to parse the $value.
o $source
- The string to parse, conforming to the $pattern.
RETURN VALUES
An array containing items extracted, or FALSE on error
EXAMPLES
Example #1
msgfmt_parse_message(3) example
<?php
$fmt = msgfmt_parse_message('en_US', "{0,number,integer} monkeys on {1,number,integer} trees make {2,number} monkeys per tree",
"4,560 monkeys on 123 trees make 37.073 monkeys per tree");
var_export($fmt);
$fmt = msgfmt_parse_message('de', "{0,number,integer} Affen auf {1,number,integer} Baumen sind {2,number} Affen pro Baum",
"4.560 Affen auf 123 Baumen sind 37,073 Affen pro Baum");
var_export($fmt);
?>
Example #2
OO example
<?php
$fmt = MessageFormatter::parseMessage('en_US', "{0,number,integer} monkeys on {1,number,integer} trees make {2,number} monkeys per tree",
"4,560 monkeys on 123 trees make 37.073 monkeys per tree");
var_export($fmt);
$fmt = MessageFormatter::parseMessage('de', "{0,number,integer} Affen auf {1,number,integer} Baumen sind {2,number} Affen pro Baum",
"4.560 Affen auf 123 Baumen sind 37,073 Affen pro Baum");
var_export($fmt);
?>
The above example will output:
array (
0 => 4560,
1 => 123,
2 => 37.073,
)
array (
0 => 4560,
1 => 123,
2 => 37.073,
)
SEE ALSO msgfmt_create(3), msgfmt_format_message(3), msgfmt_parse(3).
PHP Documentation Group MSGFMT_PARSE_MESSAGE(3)