Questions tagged [echo]
echo is a common command to print a message onto an output device, like a display
118 questions
3
votes
3
answers
322
views
How to print between " " value from XML file?
I'm using the following command combination to print value from an XML file to another file:
grep -Po '<add key="WorkstationID" value="\K[^"]+' web.config.txt | awk '{print &...
1
vote
1
answer
105
views
echo printf output in two lines for some expressions instead of one
Using Debian 12 stable.
The following echo works as expected, ie. the hardcode label and the result of the expression are displayed in the same line
echo "unzip version: $(unzip -v | head -1)&...
0
votes
2
answers
160
views
Can `find` piped to `echo` be used to do massive harm?
I am currently taking the Google cybersecurity coursera cert course. I am now in the Linux section and learning a few Linux commands, I am totally new to it but I was wondering about one thing. While ...
0
votes
1
answer
119
views
xargs and echo limited number of replacements
I want to duplicate some text a few times.
Xargs doesn't do more than 5 items.
I don't know if there is a better way to do this.
echo "sometext " | xargs -n 9 -t -I RRRR echo RRRR RRRR RRRR ...
0
votes
1
answer
64
views
Generating a script through CMD
I've been trying to find an answer to this peculiar question but haven't had any luck.
For work, I've been creating a tiny little script that would help my colleagues and I with the repetitive tasks ...
2
votes
1
answer
8k
views
silence echo without output to terminal
"NON-Compliance - PermitRootLogin" printed into output.log & test1.txt. I do NOT want to echo to the terminal. How can I do that?
echo "NON-Compliance - PermitRootLogin" | ...
0
votes
2
answers
1k
views
Calling a Recursive Function in a Batch File
I am currently trying to write a batch file for a project that will mimic the structure of the following pseudocode:
void h ( int n )
if ( n ≥ 4 )
h ( n / 2 )
end if
print ...
0
votes
1
answer
4k
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 ...
1
vote
1
answer
1k
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 ...
0
votes
1
answer
739
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': ...
1
vote
1
answer
716
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 ...
2
votes
0
answers
5k
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/...
1
vote
2
answers
1k
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 ...
1
vote
0
answers
1k
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?
1
vote
2
answers
2k
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. ...