|
What did I do to screw up my CMD shell? Windows XP Pro, open a cmd window and do:
C:\>set tt = name C:\>set tt tt = name C:\>echo %tt% %tt% C:\>echo %time% 14:13:28.67
The echo command doesn't work for some reason. I can echo the built-in ...
Started by jacobsee on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Have you tried setting the variable with no space between .
This:
echo %tt %
and see your output.
|
|
What is more efficient and/or what is better practice. To echo the html or the have many open and close php tags?
Obviously for big areas of html it is sensible to open and close the php tags. What about when dealing with something like generating XML...
Started by Mark on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
But an echo of a big string is hard to read....
The performance difference is marginal, even if a large echo is faster.
Example:
echo << makes sense to you.
Check it out please.
PHP solves this problem by what is known as heredocs .
|
|
So I have a script that I debug with a bunch of echo statements. This is run every 3 minutes on my server by cron, and I sometimes leave the echo statements in there. They're not going to a browser, they're just going... anywhere?
This is a vague question...
Started by Alex Mcp on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Is that if you leave some echo statements in a PHP script and set it as a cron job, then you will start.
|
Ask your Facebook Friends
|
I often find this in scripts (and, I have to admit, write it myself):
a=`echo $x | sed "s/foo/bar/"`
or
if echo $x | grep foo then ... fi
Consider "foo" to include some regex stuff.
I feel that there should be - and most likely is - a better way to phrase...
Started by DevSolar on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
Unless you assume a specific shell, there is no better way to do this than “pipe echo to tool.
Fi
Where need it.
Fi
Consider using:
if [ $x =~ foo ] then ...
Be
Instead of:
if echo $x | grep foo then ...
|
|
So I've got all of this really neato PHP code and I've started doing some reuse with functions out of necessity. I'm debugging, trying to figure out why I can't delete comments on my website while I'm deleting folder (because who wants orphaned comments...
Started by Michael Beck on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Well, I seriously doubt you've found a bug in the echo command, so the problem is with your program.
|
|
I could replicate the problem with various shells under FreeBSD, GNU/Linux, and Solaris. It had me head-scratching for more than an hour, so I decided to post the question here.
Started by Diomidis Spinellis on
, 8 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Alternative:
echo foo | (read a ; echo $a)
Edit:
If you need $a outside the subshell, you....
echo foo | while read a; do echo $a; done
will do what you expect it to.
Due to the piping the read is executed in its own subshell .
|
|
How can i know version of echo command as specified in the man page for echo echo --version should output version of echo command is it a bug in echo command or its documentation.. plz explain.. same is the case with echo help!!
Started by Neeraj on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Try using the real program
/bin/echo --version
For a help section of the builtin echo, try
help echo
And for its manpage, try
man bash
If you are using the bash as your shell....
You are probably hitting the shell builtin echo .
|
|
The readPassword() method of the Console class has echoing disabled.
What's echo?
Answer Snippets (Read the full thread at stackoverflow):
This is the equivalent of a password....
This way you can ask for a password on the commandline but nobody can read by eavesdropping on your computer screen .
As you would normally do.
That means you can't see the characters while you are typing in the console .
|
|
I want to conditionally output HTML to generate a page, so what's the easiest way to echo multiline snippets of HTML in PHP 4+? Would I need to use a template framework like SmartyPants?
echo '<html>' + '\n'; // I'm sure there's a better way! echo...
Started by Jeremy Rudd on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
This:
$variable = <<<XYZ <html> <body> </body> </html> XYZ; echo if(condition){ echo "HTML here"; }
With echos, if you wish to use double quotes in your HTML you must use single quote echos....
|
|
I recently looked at my source code and it was a real mess.
my php source:
echo '<h1>Rar<h1>'; echo '<span>Rar</span>'; echo '<p>Rar</p>';
and when I view the browser source for the page rendered:
<h1>Rar</...
Started by Ygam on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
This would append the OS specific newline values with echo like this:
....
If you are looking method and replace all echo statements with echo PHP_EOL, .
It cannot be redefined.
echo is not a function, but a language statement.
|