Re: (kill -1 $$)
From: Villy Kruse (vek_at_station02.ohout.pharmapartners.nl)
Date: 11/30/04
- Next message: Harald Kirsch: "reassemble command line but exactly keep given words"
- Previous message: Peter T. Breuer: "Re: Yet another "stop the bash quoting" post"
- In reply to: Stephen Riehm: "Re: (kill -1 $$)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Nov 2004 09:31:12 GMT
On Tue, 30 Nov 2004 01:49:40 +0100,
Stephen Riehm <stephen.riehm@gmx.net> wrote:
>
> Even this doesn't work:
>
> --- start
> sh
>
> cat << _EOF_ > ./suicidal_script.sh
> #!/bin/sh
> echo 2 $$
> kill -1 $$
> echo 3
> _EOF_
>
> chmod +x ./suicidal_script.sh
>
What do you get when you cat ./suicidal_script.sh ?
I would expect the $$ has been substituted by some number.
Try quote the _EOF_ string to avoid variabel substitutions.
cat << \_EOF_ > ./suicidal_script.sh
#!/bin/sh
echo 2 $$
kill -1 $$
echo 3
_EOF_
cat suicidal_script.sh
- Next message: Harald Kirsch: "reassemble command line but exactly keep given words"
- Previous message: Peter T. Breuer: "Re: Yet another "stop the bash quoting" post"
- In reply to: Stephen Riehm: "Re: (kill -1 $$)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|