Questions tagged [echo]
31 questions
1
vote
1 answer
How to feed the variable with end of lines to standard input of other application in bash?
Is there a (simple) way to feed variable with end of lines to other program in BASH? Consider example:
flist=$(ls -l)
echo $flist
echo will replace all end of lines with spaces, so my output will be different from the content of the variable. Other…

Alex Gitelman
- 275
- 2
- 7
1
vote
2 answers
echo with each parameter on its own line
I would like an output similar to ls -1d, but I don't want to check if each file exists. I would prefer to just list the files. I could use echo, but echo only puts a space between files.
How can I put a return between the files/parameters?

700 Software
- 2,233
- 10
- 49
- 77
1
vote
2 answers
Lighttpd broken when serving from Virtualbox shared folder
I've got a lighttpd web server set up on a Debian 6 guest in Virtualbox 4. I've got the www directory in a virtualbox shared folder, so that I can develop a website in the Windows host.
My problem is that two otherwise identical files created by…

KJ Tsanaktsidis
- 139
- 6
1
vote
2 answers
Strange problem with crontab and echo
$ echo -e "test1\ntest2" > logfile
$ echo -e "test1\ntest2" >> logfile
$ cat logfile
test1
test2
test1
test2
$ rm logfile
$ crontab -e
* * * * * echo -e "test1\ntest2" >> logfile
$ sleep 160
$ cat logfile
-e test1
test2
-e test1
test2
Why am…

aidan
- 615
- 4
- 10
- 23
0
votes
0 answers
How to use pam_echo.so in /etc/pam.d/sudo
I want to be able to echo a simple message in between password authentication and yubikey challenge response authentication when using sudo.
I've tried multiple ways to do it, such as pam_echo.so and pam_script.so but nothing seems to work. To my…

David
- 101
- 2
0
votes
4 answers
Command echo still working as normal after removing
I want to remove echo command (which is located in /bin/echo), but the command echo still work as normal. When I use which command, it confirm that echo was removed
/usr/bin/which: no echo in
…

Waveter
- 564
- 2
- 6
- 23
0
votes
1 answer
Find difference in file encoding
I am sending email from the cmd with msmtp for that I do
cat > test1 << EOF
>From: "Tester"
>test
>EOF
cat test1 | msmtp email@mail.com
This works while:
echo -e 'From: "Tester"\ntest' > test2
cat test2 | msmtp email@mail.com
Doesn't work…

Nabil Sham
- 267
- 1
- 2
- 9
0
votes
2 answers
Strip out the 'n' \ new line out of the echo to a file
I have a bash script that pulls a bit of text from an external MySQL database. Most of the times it are 4 lines, each one on his own line. This text (in total) has to be placed into a file. The script now pulls the information from the MySQL…

Jona Koudijs
- 75
- 3
- 10
0
votes
2 answers
echo without newline
-bash-4.1# cat output
"/root/mail/domain.com/root/Archive Dir.2012.04 April"
for i in `cat output`; do echo "$i"; done
"/root/mail/domain.com/root/Archive
Dir.2012.04
April"
I want them on a single line, as they are originally stored in the file.…

w00t
- 1,164
- 3
- 19
- 35
0
votes
1 answer
How do I use the excape characters properly in csh's builtin echo command?
I'm trying to build my fstab during install with a script, so I want to have something like this:
printf '# Device\t\tMountpoint\tFSType\tOptions\t\tDump\tPass#' >> /mnt/etc/fstab
printf '\n/dev/ada0p4.elia\t/\t\tufs\trw\t\t1\t2' >>…

Utkonos
- 416
- 4
- 15
0
votes
2 answers
Issues with echo commands?
I run this script as quanta suggest me
#!/bin/bash
EDATE=$(tail -1 a | awk '{ print substr($4, 2, length($4)) }')
EEPOCH=$(date -d "$(echo "$EDATE" | awk 'BEGIN { FS = "[/:]"; } \
{ print $1" "$2" "$3" "$4":"$5":"$6 }')"…

matarsak
- 37
- 5
0
votes
1 answer
How to control echo reply source IP in suse linux
The Client, running Suse 10. The Server, also running Suse10, and is a Cluster with a float IP. Now there is a problem about the echo communication:
Client send echo request server's float IP, and The Server reply to the Client with th source IP as…

Mingo
- 139
- 1
- 3
0
votes
2 answers
diable display command output on screen?
when i write bash the output appear on th screen ....i don't want to display the command and the command output on screen how i can do it ?

Mohammad AL-Rawabdeh
- 1,612
- 12
- 33
- 54
0
votes
1 answer
assigning aliases in .bashrc via echo '...' >> .bashrc
running cat .bashrc gives me these two lines at the end:
alias remove='rm -i'
alias chamber='ls -a -i -l'
when I run
remove
followed by a file name I get a successful removal with confirmation prompt. when I run
chamber
I get
chamber: command…

Joel
- 1
-1
votes
2 answers
nginx echo while processing not working but the same server with apache can echo while processing
PHP 8
I'm using the newest NGINX feature un WHM 96.... I can flip switch on or off to have nginx cache everything and it's working well and very fast.
**** BUT : when I have a script that does lots of echos, NGINX will WAIT untill ALL is…

Jintor
- 139
- 7