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
0
votes
3answers
67 views

Why does the following zsh command change my output?

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.
0
votes
1answer
76 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-...
0
votes
3answers
111 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 ...
0
votes
0answers
20 views

My microphone is recording every internal sound

Whenever i tried to record any sounds, my microphone also recording internal sound and also has echo and noises. How do i record only my voice, this is bother me wenever i was on video conference (...
0
votes
0answers
29 views

How to remove the echo of the microphone?

i have a twelve year old Intel motherboard DG41RQ with onboard audio. The microphone in windows works fine but in Ubuntu 18.04 generate echo, how fix it? i use headphones with microphone
0
votes
1answer
392 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
1
vote
1answer
120 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/...
0
votes
0answers
27 views

Echo remove first tab

I have reading a TSV like 1\tALBERT\tfield3 2\tBERTA\tfield3 3\tCAMUS\tfield3 \tDEMO\tfield3 5\tEPHEM\tfield3 I do echo $firstline"| cut -d$'\t' -f1 It prints 1, but echo $fourthline"| cut -d$'\...
1
vote
1answer
58 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 ...
6
votes
1answer
646 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+" "...
21
votes
1answer
1k 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 ...
1
vote
2answers
107 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 ...
0
votes
1answer
47 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 ...
0
votes
1answer
116 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/...
0
votes
2answers
70 views

What !! means while calling echo [duplicate]

Could somebody explain this output? $ echo ! ! $ echo !! echo echo ! echo ! $ I expected sedond echo to write only !!
0
votes
0answers
505 views

Serial port is slow

I've a cash drawer attached to my system via RJ11 cable in /dev/ttyS4. I'm trying to send an echo command to trigger the cash drawer using: echo -e "\x07" > /dev/ttyS4 I observed that the ...
0
votes
3answers
3k 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 [...
1
vote
0answers
536 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. ...
0
votes
1answer
104 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 ...
6
votes
1answer
2k 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 ...
1
vote
1answer
53 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?
4
votes
1answer
126 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 ...
0
votes
1answer
530 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"...
2
votes
0answers
141 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 ...
0
votes
1answer
75 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 ...
4
votes
1answer
20k views

Alexa for Ubuntu

I received an amazon Echo device as a gift. It included instructions for activating and installing Alexa, but only for Windoze and MAC. A query to the amazon help line returned a brief reply that ...
26
votes
8answers
32k 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 ...
5
votes
2answers
6k 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-...
-2
votes
4answers
1k 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.
0
votes
1answer
63 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 "\...
0
votes
0answers
117 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::################====================#####################" >> ...
0
votes
1answer
444 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 ...
0
votes
1answer
37k 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 ...
3
votes
1answer
2k 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 ...
3
votes
1answer
235 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%} $...
13
votes
4answers
26k views

Appending a line to a file in the cat command?

I can do cat file.txt to get the contents of a file but I also want to tack on a final line of my own choosing. I tried piping (cat file.txt ; echo "My final line") | but only the final line is ...
4
votes
3answers
1k views

Is there a better way to create a file in bash other than using touch and echo?

I created a bash script that installed some applications and wrote a .conf file. I wanted my bash script to create the file for me so I could just run the file and it set it all up. was there a better ...
58
votes
2answers
14k views

Why is there a /bin/echo and why would I want to use it?

I noticed that there is a binary executable /bin/echo on my Ubuntu MATE 17.04 system. I thought, that's odd, because $ type echo echo is a shell builtin Cursory testing suggests that /bin/echo does ...
3
votes
1answer
4k views

Changing text color in-line?

Short question: Using bash, is it possible to print a sentence such that each individual word has a different color? I.e; print a word in-line, change the text color, repeat?
0
votes
1answer
589 views

How to print parent working directory

How can I list everything in the parent directory without having to cd there. Can this be done with echo? In othere words instead of having to do this: cd .. && ls | grep somefile && ...
6
votes
1answer
2k views

Amazon Echo “Alexa” now only shows up as an input device

So, I've been using my Amazon Echo (the big tower, not the little "dot") as a bluetooth speaker with my Ubuntu laptop without any trouble. BUT a few days ago it started showing up only as an input ...
6
votes
3answers
4k views

Why does echo $$ return a number?

Why does running echo $$ in bash return a number like 7190, while running echo $ only returns a $?
14
votes
2answers
6k views

Using “while read…”,echo and printf get different outcomes

According to this question "Using "while read..." in a linux script" echo '1 2 3 4 5 6' | while read a b c;do echo "$a, $b, $c"; done outcome: 1, 2, 3 4 5 6 but when I replace echo with printf ...
0
votes
1answer
2k views

Bash Script Will not Print out to Console

How do I get a bash script to print out to my putty console when run. I thought I am supposed to use Echo but My script below only gives me a blank terminal when executed yet still works as planned? #...
3
votes
1answer
8k views

bash: echo: write error: Invalid argument

I am trying to setup a USB dongle on my device by following the post here. I wasn't successful in setting it up and while tracing my steps discovered that echo "1c9e:9ba1" > /sys/bus/usb-serial/...
0
votes
1answer
124 views

Script Doesn't Work In rc.local

I have a shell script that is supposed to send me a message with this command: echo 'The user "Janet" has logged in' | write gilbert pts/0 If I run it, it does print the string. But if I put it in ...
5
votes
1answer
1k views

How can you printf or echo the contents of your clipboard? [duplicate]

Alternatively, how can you dump the contents of your clipboard to a text file? If at all possible, I'd like this for the actual clipboard, but also the clipboard delegated to highlighted text, and ...
1
vote
0answers
31 views

How do I overcome “permission denied” when using sudo? [duplicate]

I’m using Ubuntu 14.04. I’m having trouble clearing out a file. I’m getting permission denied even though I’m using sudo. Here’s what’s happening … myuser@mymachine:~$ sudo chmod 755 /var/log/...
3
votes
1answer
10k views

Echo Cancellation and Noise Reduction for Ubuntu 16.04 LTS? [duplicate]

I have been using Ubuntu 16.04 LTS on my ASUS TP200SA for a week now and after making a Skype call I have realized that the features that had with Windows are gone now. My laptop has a stereo ...
1
vote
1answer
43 views

how to change part of a file name to something else on mutilple files

I'm making a game to help learn commands and I have directories that will all have the same number of files of different types in them. I need to be able to change part of the file name in each ...