echo Questions
3
Solved
On my Acer 725 with Lubuntu 13.04 this little script:
#!/bin/bash
echo "======"
echo <<xxxxx
aaaaaaaaaqqqqqqqqq
xxxxx
echo "======"
produces this output:
======
======
It should produ...
7
Solved
I have this in my .bashrc:
LIGHTGREEN="\[\033[1;32m\]"
LIGHTRED="\[\033[1;31m\]"
WHITE="\[\033[0;37m\]"
RESET="\[\033[0;00m\]"
function error_test {
if [[ $? = "0" ]]; then
echo -e "$LIGHTGREEN...
15
Solved
I have a Windows batch file I'm creating, but I have to ECHO a large complex string, so I'm having to put double quotes on either end. The problem is that the quotes are also being ECHOed to the fi...
Behnken asked 29/4, 2009 at 22:56
42
Solved
How could I do this with echo?
perl -E 'say "=" x 100'
21
Solved
I have a php script that only produces logs to the client.
When I echo something, I want it to be transferred to client on-the-fly.
(Because while the script is processing, the page is blank)
I had...
25
Solved
How do I print a newline? This merely prints \n:
$ echo -e "Hello,\nWorld!"
Hello,\nWorld!
6
Solved
Basically I want to have the terminal output a message followed by the date and time, like "Hi, today is -dateandtime-".
So echo can accomplish the first bit, and date can accomplish the last, but...
6
Solved
I just want to know why does this HTML file shows nothing:
I'm running it on a web server
Name of the file is index.php
I've fixed the <? issue but it still doesn't work
Here's the code:
&l...
3
I've gotten this script I've created in Bash, and one of the functions I'm using is echo and I'm using the -e flag for interpretations of \ backslash escapes. I have a script that prints text in co...
14
Solved
How can I write PHP code in PHP? I want to do this, but it doesn't work:
<?php echo '<?php echo \'aoeu\'; ?>'; ?>
Hope someone can give me a hint,
Many thanks
7
I've come up with a cool script that will produce the output that I need, but it only displays on the screen, so I have to copy, then paste in the commands to get them to execute. Here's the abbrev...
3
Solved
The following command prints the absolute path of a particular C++ header, according to where g++ believes it to be.
echo \#include\<ham/hamsterdb.h\> | g++ -M -x c++-header - | grep hamster...
5
Solved
What's the best, preferred way of writing if shorthand one-liner such as:
expression ? $foo : $bar
Plot twist: I need to echo $foo or echo $bar. Any crazy tricks? :)
Jerz asked 27/11, 2013 at 3:13
1
I'm running PHPUnit from the command line in windows as follows:
php phpunit.phar --bootstrap .\commonTests\bootstrap_local.php .\commonTests\DIContainerTest.php --testdox --stderr -v
and I'm get...
Ailsa asked 9/5, 2023 at 7:49
6
Solved
I turned off echo in bat file.
@echo off
then I do something like this
...
echo %INSTALL_PATH%
if exist %INSTALL_PATH%(
echo 222
...
)
and I get:
The system cannot find the path specified....
Literator asked 11/1, 2012 at 17:18
3
Solved
I'm trying to use the result of ls in other commands (e.g. echo, rsync):
all:
<Building, creating some .tgz files - removed for clarity>
FILES = $(shell ls)
echo $(FILES)
But I get:
ma...
3
This may be a more general question so sorry in advance. I am creating a script and thought it would be good to use multi-line strings instead of using multiple printf or echo statements. Say I hav...
Cordite asked 3/10, 2017 at 5:14
10
Solved
I have a Bash script that runs a program with parameters. That program outputs some status (doing this, doing that...). There isn't any option for this program to be quiet. How can I prevent the sc...
3
Solved
I'm currently trying to execute a simple echo command in Golang on Linux. My code is the following:
cmd = exec.Command("echo", "\"foo 0x50\"", ">", "test.txt")
_, err = cmd.Output()
if err !=...
6
Solved
I'm trying to add color output to my errors in bash on a Mac. The colors are not working:
#!/bin/bash
echo -e "\e[1;31m This is red text \e[0m"
I see no colors at all, as shown in this ...
3
These are the series of commands I entered that cause the problem.
brew install bash
echo '/usr/local/bin/bash' | sudo tee -a /etc/shells
chsh -s /usr/local/bin/bash
Now when I start my terminal...
14
Solved
I want to write some pre-defined texts to a file with the following:
text="this is line one\n
this is line two\n
this is line three"
echo -e $text > filename
I'm expecting something like thi...
7
Local websockets is running like a charm but on production I keep getting the error in the title.
Some background information I'm using the websocket package: beyondcode/laravel-websockets. I'm ru...
4
Solved
I'm writing a .sh script like the following:
echo script started
./some_command > output_file
echo script ended
I'd like the output to be the following:
script started
./some_command > ...
3
I've been trying to set up my a broadcast system with pusher and followed the documentation step by step. When I start the server I get an error,
"Uncaught Options object must provide a clust...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.