Questions tagged [echo]

It is a built-in command typically used in shell scripts to output status text to the screen or a file.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
77 views

I would like to have an echo in 1 line for my ASCII art but I can't manage. PLS Help [closed]

I would like to have an echo in 1 single line for my ASCII art but I can't manage. PLS Help link to my ASCII: https://ascii-generator.site/r/Mor3V1/ PLS Help it is urgent
Fjord Enzo Bertrand-Helmgens's user avatar
0 votes
0 answers
231 views

How can I stop displaying echo in a script

I have a bash script which generates another script. I would like echo output to file only, but it displays on screen whatever I try (&> for example). Here is the code : while read line; do ...
Alex Leguevaques's user avatar
0 votes
1 answer
676 views

Echo something to another terminal session?

Is there any way to echo something to another terminal session, obtained from the who command? For example, root user echoes a message to a different user's terminal session, after getting their ...
Blue Herring's user avatar
3 votes
1 answer
704 views

How do I echo a file path after interpreting characters like dots '.' and tildes '~'?

I want to write a bash script that accepts, as an input argument, a file specification that includes one or more uses of the special characters ., .., and ~. I want my script's output to echo Bash's ...
OldManK's user avatar
  • 45
1 vote
2 answers
2k views

How do I add the repository for Unity?

This is the command I am trying to run: sudo sh -c echo deb "https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list' I am trying to install unity to ...
ManOfTheRose's user avatar
1 vote
1 answer
253 views

Print double quotes in file

I would like to print this to a file echo "hello world "today"" > /tmp/file.log have as a result on /tmp/file.log hello world "today"
BurstBass BurstBass's user avatar
6 votes
1 answer
1k views

my ubuntu shows shell script echo in strange way

Hi I have a file with shell script which looks like this #!/bin/bash todayDate=$(date) echo "Today's date is ${todayDate}. have a nice weekend!" but when I call this file in my ubuntu ...
game lover's user avatar
0 votes
3 answers
6k views

How can I disable echo in terminal

This might seem simple but sometimes I need terminal to not echo anything , whether for a specific command or all commands. in windows I could simply do echo off I tend to make files with cat command ...
YoloWex's user avatar
  • 302
0 votes
2 answers
981 views

echo command breaks lines, being used in loops [duplicate]

In my file 'foo' there is a first line: 'a b', and the second line: 'c d': $ cat foo a b c d I want to print in terminal in loop these two lines: one after another: $ for i in $(cat foo); do echo $i;...
Josef Klimuk's user avatar
  • 1,586
2 votes
0 answers
536 views

Ubuntu - Other people can hear whatever I play during call

During Google Meet call, other people can hear whatever I can from my computer without me sharing my screen. It can be Youtube, FB video from Chrome or song I play on the Spotify app, whatever kind of ...
Tri Nguyen's user avatar
0 votes
1 answer
2k views

Exec format error with "data" file format

Does anyone knows why it gives format error when i try to run echo through /bin/echo or /usr/bin/echo but works well if i just type echo in the command line bash: /usr/bin/echo: cannot execute binary ...
Mr Syhd's user avatar
  • 27
1 vote
1 answer
3k views

Unable to read from serial port on command line

I tried reading from /dev/ttyS0 on 1 terminal as root with cat: cat < /dev/ttyS0 and sending message to the serial port from another terminal as root with echo: echo -ne "hello" > /...
ablan's user avatar
  • 185
-1 votes
1 answer
1k views

How to print bold text in terminal? [closed]

var=apple echo " the $var is a fruit " I want to print the apple is a fruit in bold I tried this echo $'\e[32;1m the $var is a fruit\e[0m\e ;' but not working, please help me.
MADHUKAR C.S's user avatar
1 vote
2 answers
1k views

What is the difference between using "echo" command and editing using "vi" when making changes to .bashrc file?

I finished installing a program and some websites tell me to use the echo command to export an environment variable to the .bashrc file while others say to use vi .bashrc to edit the file directly. I ...
Alex's user avatar
  • 19
-1 votes
2 answers
3k views

How to use echo output as a variable

I simulated the situation where the value of variable bar is $foo. foo is a variable too, which has the value hello. $ foo=hello $ bar=$(echo "\$foo") $ echo $bar $foo How I can get to ...
Josef Klimuk's user avatar
  • 1,586
-1 votes
1 answer
116 views

Echo it's terminal problem [duplicate]

When I type echo it's terminal or anything containing 'blah blah terminal blah blah with echo the output shows Blockquote what does this mean.
fdownnn's user avatar
  • 121
-1 votes
1 answer
167 views

Make echo based command clickable

I have this command: echo -en '\033p011' | lp -d EPSON_TM-T20III -o raw It opens cash drawer via epson thermal printer It works perfect when i execute it in terminal. But i want it as a clicable file/...
leyus's user avatar
  • 1
0 votes
1 answer
476 views

Aliasing cd && echo doesn't work properly

I'm trying to create an alias that changes the directory and prints some content. I've wrote this line: alias test="cd ~/Documents/MyDir && echo 'content'" The result is: content ~$:...
Alberto's user avatar
0 votes
1 answer
679 views

create multiple files made up of a range of values

Using linux command line I wish to create multiple text files with variables a,b,c increasing by a set range each time with a particular max., as below txt file 1 a 2 b 1 c 3 txt file 2 a 3 b 2 c 4 ...
mw00847's user avatar
0 votes
1 answer
162 views

Why I can't display/echo -e?

I am working on a project where I need to pass the value of "-e" meaning "end date" to java program(jar file) but when I tried to debug it by displaying its value(echo) if it's ...
zsonice's user avatar
0 votes
3 answers
175 views

Why does the following zsh command change my output? [closed]

When I execute this command port=3128 echo $port:localhost I get 3128ocalhost as output. PS: When I change the first 'l' char it works fine. I can't even google it.
Thomas JJ's user avatar
0 votes
1 answer
297 views

BlueTooth device(output) and PulseAudio's module-echo-cancel help needed

I'm trying to run PulseAudio's 'module-echo cancel' filter on my bluetooth speaker(output only). I've edited /etc/pulse/default.pa like that: .ifexists module-echo-cancel.so load-module module-echo-...
smolik-ja's user avatar
0 votes
3 answers
716 views

Create new text file with echo only

I have a repertory called 'data' and have multiple random files in it. I want to create a 'results.txt' file with all the names of the files in 'data'. I want to use only the command echo in one ...
Neo Capo's user avatar
0 votes
2 answers
3k views

Noise/Echo Cancelling Software for ubuntu 18.04 LTS

is there any noise cancelling software that filters background noise in ubuntu which can make my mic sound clearer when I record a voice/audio
Kenny's user avatar
  • 1
2 votes
1 answer
642 views

tee: constraint_0_power_limit_uw: No data available

I am trying to replace value in the file of constraint_0_power_limit with new value using echo "45000000" | sudo tee constraint_0_power_limit_uw That file is under /sys/class/powercap/intel-rapl/...
Mehmet's user avatar
  • 107
1 vote
1 answer
487 views

Why would one want to allow in an echo protocol (port 7) from host router?

I am in the process of replacing an Ubuntu server originally designed by someone else at work. I expect there will be many issues with getting Windows (and really LabVIEW) to interface with all the ...
barriboy's user avatar
  • 111
6 votes
1 answer
2k views

How to print variable value in next line using echo command

I'm getting a curl command output as below curl -s https://api.github.com/repos/harshavardhanc/dockerfile-ansible/pulls\?state\=all | jq -r '.[]|(.number|tostring)+" "+.user.login+" "+.created_at+" "...
Harsha's user avatar
  • 319
21 votes
1 answer
2k views

Why don't "echo -e" commands seem to produce the right output?

In the terminal of Ubuntu 18.04 LTS, when I write this command: echo -e "Hello\\\n" It gives this as the output: Hello\n But it should print, as the man page says: Hello\ That is, first print ...
yolin00's user avatar
  • 313
1 vote
2 answers
943 views

How to echo commands to other file

I want to make echo from one script to another script, but I don't want to get the output of the command because I want to use this command in another script, I need to create a script that creates ...
WhyDee86's user avatar
0 votes
1 answer
161 views

how to display number of lines in running shell file

For my assignment i need to display the current number of lines inside of a shell file, below i have implemented the wc -l command inside of my program but instead of displaying the number of lines my ...
Roosevelt Mendieta's user avatar
0 votes
1 answer
123 views

File's order got destroyed while grepping and echoing into for loop

I want to write the result of grep inside for loop into a file, keeping original file structure. Original file: $cat newtest1 some_text /homes/myself/joz ivan petrov - 20/10/19 new customer: /homes/...
Josef Klimuk's user avatar
  • 1,586
0 votes
2 answers
89 views

What !! means while calling echo [duplicate]

Could somebody explain this output? $ echo ! ! $ echo !! echo echo ! echo ! $ I expected sedond echo to write only !!
sanyassh's user avatar
  • 157
1 vote
3 answers
9k views

curl, sh, what do those commands mean?

I've been wandering in the web and saw this about how to install atom, the new text editor: $ curl -sL https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add - $ sudo sh -c 'echo "deb [...
UgaUga's user avatar
  • 29
2 votes
0 answers
1k views

Avoid trailing whitespace when copy/pasting from bash/byobu terminal

I wrote a bash script that computes information and echoes it into my byobu terminal. I then select the whole thing with my mouse and paste it into a Gmail conversation after editing it a bit. ...
Nicolas Raoul's user avatar
0 votes
1 answer
182 views

Every terminal I open starts with this code, how can I stop this?

every time I open up a terminal it starts with this. export PATH="/home/name/.rbenv/shims:${PATH}" export RBENV_SHELL=bash source '/home/name/.rbenv/libexec/../completions/rbenv.bash' command rbenv ...
FidelVe's user avatar
  • 33
6 votes
1 answer
5k views

Why there is a difference between the output of 'echo $VAR | wc -c' and 'echo ${#VAR}'?

I'm working on a Bash script and the length of the string contained in a certain variable is one of my conditions. The current string is W5u7TBTzF17GGFV8DBJHvgAAAAI. Initially I've count the string ...
pa4080's user avatar
  • 29.8k
1 vote
1 answer
151 views

How do commands fill up the screen?

Some commands, like curl if you do the -# option, fill up the entire screen, even if you resize. How is this done?
Levi Stepanek's user avatar
4 votes
1 answer
289 views

echo command variations

Worked for years but now at least \begin and \end are handled especially. The change in echo behaviour must be new. Even if echo is not portable and the dash echo doesnt support -e / -E options ...
Horst Fiedler's user avatar
0 votes
1 answer
744 views

Escape command in echo

I have some really long and complex command containing both types of quotes: " and ', for example like: cd folder && command --hel="p_me:'please' anyone:'here?'" ; command2 --end='my:"trouble"...
aleskva's user avatar
  • 1,647
2 votes
0 answers
170 views

I want to enable mic echo-cancellation in Ubuntu Mate, but it doesn't work. Please, help!

Please help! I want to enable echo-cancellation in Ubuntu Mate. I watched Yt tutorials and answers on this forum. For solutions like this: Edit /etc/pulse/default.pa and add the following lines to the ...
Gabriella Kozma's user avatar
0 votes
1 answer
172 views

Executing echo Command Using Launcher Icon [duplicate]

I am controlling the fan speed on my notebook using acpi and the command: echo level n > /proc/acpi/ibm/fan where level n is a number between 1 and 7. It works, and after I changed the ...
UbuntuDarmstadt's user avatar
26 votes
10 answers
62k views

How to print text in the terminal as if it's being typed?

I have a simple echo print out that I've added to my .bashrc: echo "$(tput setaf 2)Wake up....." sleep 2s reset sleep 2s echo "$(tput setaf 2)Wake up....." sleep 2s reset echo "$(tput setaf 2)Wake up ...
SimplySimplified's user avatar
9 votes
2 answers
11k views

Disable volume auto adjust in pulseaudio "module-echo-cancel"

Important: this question How to disable microphone from auto adjusting its input volume doesn't cover this scenario. This question is about the volume auto adjust feature of pulseaudio "module-echo-...
Paulo Coghi's user avatar
  • 1,984
-1 votes
4 answers
4k views

Split echo's output on two lines

It is written in the manual that /n will split the output of echo command to the next line. I tried: echo -e 'hello /n world' hello /n world Expecting 'world' on the next line. I failed.
Josef Klimuk's user avatar
  • 1,586
0 votes
1 answer
70 views

I am quite unsure of how echo command works in the following two scenarios [duplicate]

I have tried fiddling with echo command to to add $_GET to a text file but looks like it does not work but escaping it with \ works may be because $ is special character in bash. For example, echo "\...
codedbrain's user avatar
0 votes
0 answers
261 views

Echo and Cat output problem

I'm trying to run this script: #!/bin/bash for file in /home/dima/Downloads/dir/* do if [ -f "$file" ] then echo "SSS::################====================#####################" >> ...
Melvil's user avatar
  • 3
0 votes
1 answer
888 views

echo "eval `dircolors ${dircolorsdb}`" >> ~/.zshrc didn't work as I expected

I want to insert eval `dircolors $HOME/.dir_colors/dircolors.256dark` in my ~/.zshrc I assigned a variable: dircolorsdb=$HOME/.dir_colors/dircolors.256dark I expect double quotes to result in ...
Mithril's user avatar
  • 2,341
0 votes
1 answer
47k views

What does the echo command do? [duplicate]

I am fairly new to Linux and all I know for sure about the command echo is that when you type a word after it, such as echo Linux!, it prints out Linux!. Is there anything else echo does? I don't ...
SealsRock12's user avatar
5 votes
1 answer
5k views

Error using sudo -stdin

I'm trying to use the -S stdin arg on sudo. I tried this: echo 'mypass' | sudo -S cat /etc/shadow And echo 'mypass\n' | sudo -S cat /etc/shadow As the man pages suggest to add a newline. Both ...
Mathias Maes's user avatar
3 votes
1 answer
434 views

Error while trying to post $PS1 on my terminal

I have tried to echo $PS1 on my terminal to find out the [u@h W] this is the error I get. echo $PS1 %{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%X]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $...
dwayne's user avatar
  • 31