07-15-2009
When a process that is on the left side of the pipe writes some output and the process on the right has exited, the SIGPIPE signal is passed to the left process. If it is not handled, the default shell behaviour is to terminate that process.
It seems that the echo builtin doesn't handle SIGPIPE signal, whereas /bin/echo ignores it.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi guys
wht is the difference between these two command in bash shell scripting
$var1=world!
$echo hello $var1
$echo "hello $var1" (8 Replies)
Discussion started by: srinivas2828
8 Replies
2. Shell Programming and Scripting
Hi,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies
3. Shell Programming and Scripting
Hello All
Nice to meet you all here in this forum,
it's my 1rst time here
i'm asking about a little issue that i face
i added a ksh script that echo " please insert your name " and store the output to a login.log file.
the script is working fine with normal telnet
but Xstart is not working... (8 Replies)
Discussion started by: islam.said
8 Replies
4. Shell Programming and Scripting
echo `echo ` doesn't echoes anything. And it's logic. But
echo `echo `echo ` ` does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo"
(too much echoing :P):o (2 Replies)
Discussion started by: hakermania
2 Replies
5. UNIX for Dummies Questions & Answers
what if the difference between
#!/bin/sh
and
#!/bin/bash
I wrote a script with the second heading now when i change my heading to the first one ...the script is not executing well....im not getting the required output....any solution to this problem...or do i have to start the... (3 Replies)
Discussion started by: xerox
3 Replies
6. Shell Programming and Scripting
Hi guys,
I have a shell script where I have the following:
for i in ad0 ad1
do
gpart create -s gpt $i || echo "Cannot create GPT partition on "$i". Exiting ..."
gpart add -s 128 -t freebsd-boot $i || echo "Cannot add freebsd-boot partition on "$i". Exiting ..."
gpart add -s 4G -t... (2 Replies)
Discussion started by: da1
2 Replies
7. AIX
Hi Folks,
As per the subject, the following command is not working as expected.
echo $variable | mail -s "subject" "xxx@xxx.com"
Could anyone figure it out whats wrong with this. I am using AIX box.
Regards, (2 Replies)
Discussion started by: gjarms
2 Replies
8. Shell Programming and Scripting
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies
9. UNIX for Dummies Questions & Answers
Hi guys,
Been messing around with shell programming for a couple of days and I found something that was pretty odd in the behavior of the echo command. Below is an example-:
When I type the following in my /home directory from my lxterminal in Debian-:
echo "`ls -l`"
I get the... (2 Replies)
Discussion started by: sreyan32
2 Replies
10. Shell Programming and Scripting
I'm on Ubuntu 14.04 and I manually updated my coreutils so that "tee" is now on version 8.27
I was running a script using bash where there is some write to pipe error at some point causing the tee command to exit abruptly while the script continues to run. The newer version of tee seems to prevent... (2 Replies)
Discussion started by: stompadon
2 Replies
kill(1) General Commands Manual kill(1)
Name
kill - send a signal to a process
Syntax
kill [-sig] processid...
kill -l
Description
The command sends the TERM (terminate, 15) signal to the specified processes. If a signal name or number preceded by `-' is given as first
argument, that signal is sent instead of terminate. For further information, see
The terminate signal kills processes that do not catch the signal; `kill -9 ...' is a sure kill, as the KILL (9) signal cannot be caught.
By convention, if process number 0 is specified, all members in the process group (that is, processes resulting from the current login) are
signaled. This works only if you use and not if you use To kill a process it must either belong to you or you must be superuser.
The process number of an asynchronous process started with `&' is reported by the shell. Process numbers can also be found by using It
allows job specifiers ``%...'' so process ID's are not as often used as arguments. See for details.
Options
-l Lists signal names. The signal names are listed by `kill -l', and are as given in /usr/include/signal.h, stripped of the common SIG
prefix.
See Also
csh(1), ps(1), kill(2), sigvec(2)
kill(1)