Questions tagged [echo]

echo is a common command to print a message onto an output device, like a display

Filter by
Sorted by
Tagged with
0 votes
1 answer
63 views

Echo line to start of text file using Windows batch command?

This works to add the text my_new_text as the last line in all .txt files: FOR /F "tokens=*" %%G IN ('dir /b *.txt') DO echo my_new_text>> "%%G" Is there a simple edit that ...
user avatar
  • 395
1 vote
1 answer
41 views

Echo variable which references another variable in shell script

Statement: "$k"_Id_avg="$(grep -i "$k"_Id_avg file.txt)" and $k is a loop variable. Now I want to print the value stored in the above variable, how can I do it? I have ...
user avatar
0 votes
1 answer
30 views

Why does `xargs` not work with `echo` but work with `ls`?

root@home:~$ ls root@home:~$ echo abc > z1 root@home:~$ echo xyz > z2 root@home:~$ ls z1 z2 root@home:~$ ls | xargs -I{} cat {} abc xyz root@home:~$ echo z1 z2 | xargs -I{} cat {} cat: 'z1 z2': ...
user avatar
  • 445
0 votes
0 answers
40 views

Can't insert correct "enable" secret password with Plink.exe for my Dell switch

I'm trying to use "Plink.exe" to connect throught SSH to my Dell switch N1548P and run "enable" command to enter EXEC mode. I'm using Plink with CMD in Windows 10. This is the ...
user avatar
1 vote
0 answers
154 views

Root Amazon Echo and install linux kernel - what programs can run on it? [closed]

I have an old v1 Echo that I want to experiment with. Using this guide, I see it's possible to root this Echo and install a custom linux kernel (2.6.x) on it: https://github.com/echohacking/wiki/wiki/...
user avatar
1 vote
2 answers
128 views

Tail -f is not showing the update of the file when edited form editor

I have opened a file using tail -f <filename, and tried to append some texts in the same file from another tab using vim, the updated content is not showing. But if I append some texts using echo ...
user avatar
  • 113
0 votes
0 answers
164 views

Can anyone explain what are this numbers `echo -ne "\033]0;Title\007"` [duplicate]

I'm using them for setting the terminal title or terminal tab title but want to know what the numbers refer to. Could anyone please give me a hint on where I can find that info?
user avatar
1 vote
2 answers
188 views

Spectrum Router not allowing ICMP Echo Requests

I am currently trying to set up a server off of my Windows 10 PC, after lots of troubleshooting I have concluded that my router is blocking ICMP Echo requests (AKA Ping) from reaching my computer. ...
user avatar
0 votes
2 answers
2k views

Difference between Echo and Write-Host in PowerShell ISE

I'm starting to learn (beginner) about PowerShell script. I found that echo and Write-Host both can display output in the console screen, so what is the difference between them? I read this question ...
user avatar
  • 49
1 vote
2 answers
344 views

(git) Bash: how exactly does a line break differ from \n in a variable?

My apologies, I must have made some mistakes when performing the initial tests, as after putting everything into a single script the xxd output does indeed always match the stdouput. The entire script ...
user avatar
0 votes
0 answers
104 views

use echo to write to file and include single quotes

I have the command here doctl compute ssh testdroplet --ssh-command 'echo -e "import http.server\nimport socketserver\nfrom http import HTTPStatus\n\nclass Handler(http.server....
user avatar
  • 370
0 votes
1 answer
133 views

Supress stdout except for echo commands but show stderr

I have put a very large bash script together that installs packages and configures a LAMP stack etc. With any scripting I usually do, I like to tidy it up by using echo commands to let the user ...
user avatar
1 vote
2 answers
233 views

7zip password protected zip - SHOW the password that i type

wondered if, when i unzip a pasword protected file and it says "enter the password, it will not be echoed" if i could see either what i type or paste (echoed!) OR a ***** to show that what i'...
user avatar
1 vote
0 answers
71 views

CMD echo working with PLINK>exe

good day, I tried to use the format below for my plink and when I went to login with the username I changed the password on it didn't accept the new password. so my question is, when using "(...
user avatar
0 votes
1 answer
63 views

Create a Automate script and use another script is echo password

I have created a fully automated script which uses ssh login to login from one server to another and do some file operation, but the script is not fully automated as it prompts for a password, we do ...
user avatar
6 votes
3 answers
2k views

How do I create a command on Windows without having to create a file?

I want to create the command hello without having to create a file like hello.bat. I want the command without the file. The command must execute an echo Hello World!. Is there a way to do it on ...
user avatar
  • 81
0 votes
1 answer
47 views

Is it possible to make a bash script to simplify using echo to overwrite the same text file with new text?

What I'm trying to do is simplify using echo as I will be overwriting the same file each time with different text. Currently I'm using this in the terminal: echo "blah blah blah blah" > /home/...
user avatar
  • 3
1 vote
1 answer
46 views

What is echo doing?

Recently, I noticed that echos in which I include lots of "!" result in weird stuff. For example: echo !! gives me: echo rm -r * 1000 rm -r * 1000 (rm -r * was the last command I executed before ...
user avatar
  • 431
3 votes
2 answers
743 views

redirect echo in a cmd batch file to a variable fail

I use the below function to check if echo is set on or off, and as you can see it pipes echo statuse and then uses the output to set a flag: FUNCTION :echos echo > echo.txt & rem pipe ech ...
user avatar
  • 53
0 votes
2 answers
11k views

How to connect Echo Dot to University protected wifi

I recently won an Echo dot in a Hackathon and I was very excited to try it out but sadly the dot does not connect to 'Eduroam', the university network. The Uni site says that eduroam uses '802.1x ...
user avatar
  • 123
0 votes
1 answer
2k views

whitespace padding a file length using echo in a windows batch file

I'm using a for loop in a windows .bat file to make a text-file listing files in directories. FOR /R %%G in (*) DO ( ECHO %%~zG %%~nxG >> zzz-list.txt ) [Phone won't let me input a tab ...
user avatar
  • 143
0 votes
0 answers
337 views

Blue Snowball Ice usb mic has echo sound

I use the Blue Snowball Ice usb mic. I have put mic around 6 - 12 inches from my mouth. I have used screen cast ometic Normalize and Reduce Noice functionalities of that tool. But I can hear a big ...
user avatar
  • 209
0 votes
1 answer
155 views

My echo file is returning the incorrect order for files

So I'm using FFmpeg to join a list of .ts files together, to do this I need to create an echo file with all the names of the .ts files in chronological order. The files are all named as numbers, in my ...
user avatar
1 vote
1 answer
95 views

Dir piped into Set

Im trying to make a program that selects a file name, then pipes it into a variable. My Attempt: Dir /B "C:\Program Files (x86)\ServerMaster\Internals\Versions\Van1" | (set /p myVar= & set myVar)...
user avatar
1 vote
1 answer
443 views

Difference between echo $(cal) and echo "$(cal)" [duplicate]

I'm using echo $(cal) and echo "$(cal)"in Linux and it gives me different results as in the picture. The double quotes should not interfere with $ in this case, so what gives the echo "$(cal)" that ...
user avatar
  • 13
0 votes
2 answers
105 views

How to redirect output to a file so the previous redirected output is not lost?

I'm quite new to all this, trying to run a basic batch file to output some commands to a document. It works fine until I add some more echos in. Example: echo "Failed Drives" > Report.rtf ...
user avatar
1 vote
2 answers
2k views

bash script:echo output garbled and in wrong order

I am having an issue with a bash script that is echoing output in an unexpected order. The script is as follows. The problem is with the output of lines 30-32. 1 IFS=$'\n' 2 i=1 3 bluered="" 4 ...
user avatar
  • 481
0 votes
1 answer
1k views

How to read a .txt file in a batch script on a network? [closed]

I'm making a little game because I was bored and I want it to work in a LAN network, my map files are in a shared file. When I try to echo the contents nothing comes out. Here is the code: ( ...
user avatar
0 votes
1 answer
487 views

Add variable space at the end of line in file

I want to add white space at the end of each line. Number of white space is in variable. If number of white space is fixed then I can use this command sed 's/$/ /g' for two spaces. space_variable=...
user avatar
1 vote
0 answers
173 views

Can't access server with username that has spaces

I amn trying to test out how PsExec work. However, even when I'm trying to simply send a 'echo Hello', with the correct password and everything, it says that couldn't access the other computer. Here'...
user avatar
0 votes
1 answer
316 views

How reinstall the /bin/echo in my debian?

Something wrong for my /bin/echo command. sudo ls -al /bin/echo -rwxr-xr-x 1 root utmp 0 Nov 11 18:05 /bin/echo method1 to fix it: I knew that /bin/echo is in coretils. Remove coreutils first then ...
user avatar
  • 133
0 votes
3 answers
2k views

find: ‘echo’: Permission denied

It is my os info: sudo uname -a Linux machine 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux Files beginning at test in /tmp. ls -al test* -rw-r--r-- 1 debian9 ...
user avatar
  • 133
0 votes
1 answer
943 views

How to create a file with multiple lines and / - Windows Command Prompt

How can I create a file with multiple lines, / and " ? I am trying to create a scss file where I the text has multiple lines, / and " Is there any way where I don't have Here is the code I have ...
user avatar
1 vote
0 answers
250 views

Batch Banner colored only

I would like to have the banner that I call always in red let's say and all the other text be white. How can I do ? Thank you. :BANNER CLS echo ___ _ _____ echo ...
user avatar
  • 25
1 vote
1 answer
262 views

Set arbitrary text to windows clipboard

I'm using clip to set text on the clipboard. To do that, I use echo. echo Works|clip The problem is when the text contains special characters, eg. | ". echo (TRUE|FALSE)|clip echo " is a Quote Mark|...
user avatar
  • 113
1 vote
2 answers
5k views

use echo and another command in the same line in batch file

For for this code echo x set /p "a=>" result will be x set /p "a=>" The result i want is x> Please help,thanks
user avatar
35 votes
2 answers
6k views

What is wrong with “echo $(stuff)” or “echo `stuff`”?

I used one of the following echo $(stuff) echo `stuff` (where stuff is e.g. pwd or date or something more complicated). Then I was told this syntax is wrong, bad practice, non-elegant, excessive, ...
user avatar
0 votes
2 answers
1k views

Echo: Multiple commands

Hoi everybody, I am currently struggling with having to execute multiple commands in an echo. The following line is an example of the problem I am having: echo (cd .. && pwd) The idea is, ...
user avatar
  • 101
4 votes
1 answer
8k views

append to end to line without newline

When i try to append to the end of a file it creates a new line. Now I have tried to fix this with echo -n but that doenst work. So what am I trying. I'm trying to get the following result: Hello ...
user avatar
  • 43
0 votes
1 answer
41 views

How to echo from web to a file in windows terminal?

What I want is to run a command in a terminal that will download a Visual Studio git ignore raw file, save it to .gitignore file in a folder where my terminal is opened on my Windows 10 machine. I've ...
user avatar
  • 243
2 votes
1 answer
2k views

Eval and echo use together

I want to know if the code below can be improved of how it is written is the way to write it. If it wasn't clear I am a newbie to bash but my script completes its purpose. This code is trying to ...
user avatar
  • 121
1 vote
2 answers
54 views

Bash echo from input file with additional data

I currently have thousands of .jdx files and I've managed to find a way to get the lines I need from the files echoed into a new file. What I cant seem to do is get the additional data I need to be ...
user avatar
17 votes
7 answers
32k views

Cat command and echo

I'd like to concatenate the output from echo with content of a file. I've tried the following comand: echo "abc" | cat 1.txt > 2.txt but the 2.txt file only contains the content from 1.txt. Why ...
user avatar
  • 937
4 votes
2 answers
2k views

Writing ECHO output to VBS File not working

I am writing a Batch Script that creates a VB Script by echoing each line and directing the output to the created file. It works for the most part, except for two lines that get Command Line variables ...
user avatar
2 votes
1 answer
62 views

echo command issue on Unix server

I am trying to copy some configurations to unix endpoint using below echo command, after copying i see few characters are missing or sometimes gets prefixes. example below. need your suggestion here....
user avatar
22 votes
1 answer
13k views

Why does `echo -e "\\\SOME_TEXT"` show only one backslash?

Could some one explain what is happening behind the scenes in character escaping in Linux shell? I tried the following and googled a lot, without any success in understanding what (and how) is going ...
user avatar
2 votes
1 answer
2k views

Using watch command with "echo -e"

I want to monitor rows of a dynamic file and I use watch command for this. I have 2 files: test-status and iplist_test. I control something in iplist_test and I type this output to test-status. ...
user avatar
1 vote
3 answers
298 views

Why is the output of this echo command over-running into multiple lines?

I have a directory of photos whose names are the time and date the photo was taken. E.g: ~$ ls directory -1 2003-09-15 03.30.33.jpg 2004-05-04 12.45.28.jpg 2004-05-04 12.45.51.jpg However, if I run ...
user avatar
  • 2,657
46 votes
2 answers
164k views

Path Environment Variable Windows 10. Echo %Path% on command prompt shows only %Path% [duplicate]

My variable value in path is as follows C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program ...
user avatar
  • 569
0 votes
1 answer
175 views

Echo Variable To File Without New Lines

I want to get rid of new lines in Echo then suffix a file with them. files=$(cat ./Temp/files.txt) prefixedfiles=$(cat ./Temp/prefixedfiles.txt) echo "$files" >> generatedscript sed -e 's/^/...
user avatar
  • 15