Say I have a bash script as follows
while
read $f;
do
cat $f >> output.txt;
echo "aaa" >> output.txt;
done
Yet the second echo statement isn't executed. At all. What am I doing wrong?
I'm running this via
tail -f /var/log/somelog | ./script.sh
$f should not be empty. It's only supposed to output when tail notices a change in th...
Hello
I use the modern theme
I have a livechat button on the header and i want to parse informations in my template
This is the livechat button :
<!-- http://www.LiveZilla.net Chat Button Link Code --><a href="[removed]void(window.open('http://xxxxxx.fr/livezilla.php?code=BOUTIQUE&amp;en=<!!CUSTOMER NAME!!>&ee=<!!!CUSTOMER...
Hello. I'm having a bit of a problem. I am trying to create an IRC bot, which has an ampersand in its password. However, I'm having trouble putting the ampersand in a string. For example...
<?php
$var = "g&abc123";
echo $var;
?>
I believe this should print g&abc123. However it's printing g.
I have tried this as well:
<?php
$arr =...
I am trying to echo some text if my loop returns with no data but can't get it do work. I have tried a few things but no luck.
my code:
$result = mysql_send("SELECT * FROM datatable WHERE id='".
$_SESSION['id']."'ORDER BY id ASC LIMIT 2");
while($row=mysql_fetch_array($result)) {
$a = 1;
extract($row);
echo 'Trans ID:...
I've been started studying PHP in my spare time, and the first code example I was given was this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body>
<?php
echo "Hello World";
?>
</body>
</html>
From what I understand, this should write out "Hello World". However, all I see is ...
I have a full list of timezones in a select menu like so:
<option value="Pacific/Kosrae"> Pacific/Kosrae( +11:00 GMT ) </option>
<option value="Pacific/Kwajalein"> Pacific/Kwajalein( +12:00 GMT ) </option>
<option value="Pacific/Majuro"> Pacific/Majuro( +12:00 GMT ) </option>
<option value="Pacific/Marquesas"> Pacific/Marquesas( -...
Hi all!
I've a php script that only produces logs to the client.
When I echo something, i wan't it to be transfered to client on-the-fly.
(Because while the script is processing, the page is blank)
I had already played arround with ob_start() and ob_flush(), but they didn't worked.
What's the best solution?
PS: it is a little dirty to ...
hi all,
i'm still a beginner, and guess it's a simple CakePHP question...
all i want is to echo retrieved data from database (one row is selected).
i have next code:
$cover_page = $this->Publication->find('list', array('conditions' => array('Publication.id' => $id)));
now, how can i echo field title from selected database row?
tn...
I read in a csv file by using a while loop:
while (($data = fgetcsv($handle, null, ",")) !== FALSE)
and i want to skip the first row because this is the title row and i want to display on the screen "first line skipped".
if($data[0]=="title")
echo "Title row..skipping<br />";
else
//do stuff
The problem is since its in a while ...
I am trying to convert some xml into a json object using PHP.
This should be working, yet for some bizarre reason it is failing.
Could someone provide some input.
// Loop Through images and return the right one.
$i = 1;
foreach($page->image as $image) {
if ($i == $_GET['id']) {
echo json_encode(array(
'backgro...
Hi guys..
I have a date variable like 10-25-1998 and I only want to echo 10. Can anyone help me about it? Thanks...
$dateString=date("m-d-Y", mktime(0,0,0,10,25,1998));
echo date('m', $dateString); // not working here....will print out 01
...
I'm currently using GDB to debug a C Extension for Rails 3. Everything works perfectly except for RDebug contexts, where both GDB and RDebug echo my key input.
How can I turn off the key echo for RDebug? I don't believe I can solve this through GDB, as that would require constantly switching the echo on and off.
...
The following code outputs 43211, why?
echo print('3').'2'.print('4');
...
Not sure if the title makes sense... so I'll elaborate a bit.
I'm toying with this makefile that uses gcc's auto-dependency list generator.
At the same time, I wanted to keep a nice sorted directory structure that separates source, headers, and resources.
The layout's nice and simple like so
MAIN
src
include
objects
dependencies
...
I am currently proposed to do my web portal using GWT however I have researched that its closest competitors is Echo2. But what are the differences between them?
...
Hi there,
I'm attempting to return a string of html with an some php code within the html and I'm experiencing a bit of difficulty doing so. Example below:
return '//bunch of html here
<div id="test">
<?php
if (isset($_COOKIE[\"cannycookie\"]))
{
echo "<a class=\"reply\" href=\"#\" id=\"deletelink-'.$d['id'].'\">Delete</a>...
hey.
with the following code
<?php
if (qtrans_getLanguage() == "en") {
echo <?php include( TEMPLATEPATH . '/slider_en.php' ); ?>;
}else{
echo <?php include( TEMPLATEPATH . '/slider_de.php' ); ?>;
}
?>
i'm trying to include a file, based on the chosen language of the website. guess my idea is right but i'm totaly wrong on ...
I'm implementing a VOIP application that uses pure Java. There is an echo problem that occurs when users do not use headsets (mostly on laptops with built-in microphones).
What currently happens
The nuts and bolts of the VOIP application is just the plain datalines of Java's media framework. Essentially, I'd like to perform some digita...
This is an array i have
<?php
$page['Home']='index.html';
$page['Service']='services.html';
?>
How do i get to echo something like this for individual one like
Home is at index.html
and again how can i do this through a loop and echo all?
...
Hi,
I want to give sound effects like echo, flange etc to a sound in iphone sdk.
Can anyone help me out how can I achieve this.
Thanks
...