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...
Celebrate asked 13/1, 2014 at 12:53

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...
Langland asked 6/7, 2011 at 5:48

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'
Pressey asked 18/3, 2011 at 8:45

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...
Deaminate asked 28/6, 2010 at 14:26

25

Solved

How do I print a newline? This merely prints \n: $ echo -e "Hello,\nWorld!" Hello,\nWorld!
Eartha asked 11/12, 2011 at 21:1

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...
Bid asked 2/2, 2012 at 0:16

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...
Mystique asked 8/4, 2014 at 13:57

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...
Velasquez asked 27/4, 2017 at 15:4

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
Acrodrome asked 5/8, 2011 at 15:54

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...
Terryn asked 16/7, 2013 at 10:27

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...
Delvecchio asked 29/1, 2012 at 9:35

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...
Stratovision asked 5/4, 2012 at 7:25

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...
Farther asked 5/3, 2009 at 23:38

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 !=...
Benelux asked 17/10, 2016 at 15:31

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 ...
Drover asked 28/2, 2015 at 13:44

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...
Fulford asked 7/4, 2019 at 18:53

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...
Inclinatory asked 29/5, 2014 at 8:44

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...
Krick asked 5/10, 2019 at 11:30

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 > ...
Killdeer asked 25/9, 2013 at 20:26

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...
Theft asked 24/12, 2022 at 17:29

© 2022 - 2025 — McMap. All rights reserved.