Hi Feherke
>>By the way, do you really need to set that variable inside the braces ?
Not a must, I can work around it.
What I'm really trying to do is this:
{
comand1
...
comandX
if something good; then
SUBJECT=OK
else
SUBJECT=NOTOK
fi
} mail -s $SUBJECT
I could redirect out to a...
I wonder if I spoke too soon on this, doing as suggested on the cmd line is OK, but as a shell script seems not working?
OK:
# { foo=bar; } > >( echo "~$foo~" )
# ~bar~
# cat i
#!/bin/bash
{ foo=bar; } > >( echo "~$foo~" )
Neither of these work:
#bash i
~~
#./i
~~
# bash -x i
+...
Feherke,
Thanks so much. Exactly Right. After you posted I researched that and found some links that are helpful in learning more:
http://tldp.org/LDP/abs/html/process-sub.html
http://www.linuxprogrammingblog.com/pipe-in-bash-can-be-a-trap
Thanks!!
jouell
#!/bin/bash
set -u
ls /etc
{
ls /
SUBJECT=TEST
} | mail -s "$SUBJECT" $ME
This returns "unbound variable" or just a blank subject w/o set -u. I thought the commands/script outside of the curly braces can see the variable $SUBJECT as it's supposed to be global.
I am missing something...
Annihilannic
Outstanding! Thank you.
Here's the full final working script (modified to the real world), and output.
#!/usr/bin/ksh
#Given a Destination, return policy id, source ips for a netscreen fw
if [[ -z $1 ]]; then
echo Usage: $0 IP file
exit
fi
dest=$1...
Hi All,
I am trying to write a shell script that does the following:
Looks through a configuration of a firewall (netscreen) that has the following general format:
Policy port sourceIP destinationIP direction etc. etc.
src IP address1
src IP address2
src IP address3
src IP address4
exit
I...
Sorry, using tee is fine! I was thinking not using tee -a and
my brain misfired. You actually helped solv my issue by prompting the thought.
Correct solution is:
printf "A new IP was blocked from connecting to Port 80\n" | tee >(mail -s "Blacklist Alert" "$RECIPIENT")
Thanks!
jouell
Hi.
I have a shell script that will alert me when a new event has happened, basically:
<snip>
printf "A new IP, $IP was blocked from connecting to Port 80\n"
printf "A new IP, $IP was blocked from connecting to Port 80\n" | mail -s "Blacklist Alert" "$RECIPIENT"
What I would like to do is to...
The following works just fine now (on a different server).
#/etc/apache2/sites-available# cat all
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
Include /etc/apache2/all_conf
</VirtualHost>
<VirtualHost *:443>
Include /etc/apache2/all_conf
SSLEngine on
SSLCertificateFile...
To clarify:
I can get Apache to host an HTTP site on port 80, and an SSL site on port 443. All works just fine.
However it's when I try to consolidate the configuration using the include directive as above.
For some reason my application keeps redirecting itself in an infinite circle. I...
<VirtualHost *:80>
Include /etc/apache2/sites-includes/SITE01.A
</VirtualHost>
<VirtualHost *:443>
Include /etc/apache2/sites-includes/SITE01.A
SSLEngine on
SSLCertificateFile /etc/ssl/certs/www.cer.pem
SSLCertificateKeyFile /etc/ssl/private/www.cer+key.pem
</VirtualHost>
This didn't seem to...
Hi Noway2
>>Aside from the SSL parameters, you should be able to copy your port 80 virtual host information to the virtual host for 443.
Right. That works OK.
>>Note, technically speaking, secured named virtual hosts aren't supported in apache. Theoretically, you can only have one secured...
Hello.
Is it possible to configure like the example below ? Same config for 80 and 443 ports and special config for 443 port. I'd like to run both port 80 and 443 and have the 443 site 'inherit' all the basics from the 80 site.
NameVirtualHost *:443
NameVirtualHost *:80
<virtualhost *:80>...
Hi All,
Can someone suggest a file integrity tool that they have *actually used* or *currently use* successfully and is relatively easy to use?
I am using Ubuntu LTS 8.04
Specifically
I tried http://www.saddi.com/software/yafic/ (which is really what I'm looking for) but can't get it to...
Thanks All
I think that's a great utility! I had both files sorted and clearly comm is very fast!
The big key seems to be to make sure the files are sorted.
Thanks again!
-jouell
Hi All,
I have 2 large files (~2GB each).
They both contain a list of URLS.
I believe they should roughly overlap.
So, I have a script to grep the URLs do exist in file1 but not in file2:
#!/bin/bash
file1=urls1.txt
file2=urls2.txt
file3=not_found_in_1.txt
while read line; do
grep...
All,
This is now solved.
http://www.excelforum.com/excel-programming/660475-excel-macro-referencing-a-variable-file-name-to-import.html#post1989237
Thanks to all who posted.
Best,
-jouell
SkipVought
Thank for the update. There's no need for CAPS though or referring to task as simple or otherwise.
Here's the result. I anticipate your best solution!
Sub edit()
'
' edit Macro
' Macro recorded 10/30/2008 by Google
'
'
Range("F9").Select
ActiveCell.FormulaR1C1 = "3"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.