Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. jouell

    Curly braces in bash allow script to see variable?

    Hi Feherke Right those commands need to be included in the email. I can rewrite the script w/a temp file. Thanks for looking here! jouell
  2. jouell

    Curly braces in bash allow script to see variable?

    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...
  3. jouell

    Curly braces in bash allow script to see variable?

    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 +...
  4. jouell

    Curly braces in bash allow script to see variable?

    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
  5. jouell

    Curly braces in bash allow script to see variable?

    #!/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...
  6. jouell

    Parsing config files with shell!

    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...
  7. jouell

    Parsing config files with shell!

    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...
  8. jouell

    Writing to screen and /bin/mail

    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
  9. jouell

    Writing to screen and /bin/mail

    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...
  10. jouell

    Same config for 80 and 443 ports and special config for 443 port?

    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...
  11. jouell

    Same config for 80 and 443 ports and special config for 443 port?

    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...
  12. jouell

    Same config for 80 and 443 ports and special config for 443 port?

    <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...
  13. jouell

    Same config for 80 and 443 ports and special config for 443 port?

    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...
  14. jouell

    Same config for 80 and 443 ports and special config for 443 port?

    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>...
  15. jouell

    File integrity checker Suggestions

    It is but I am looking for a fuller solution. la-samhna.de/samhain/ seems to fit the bill here. Thanks -jouell
  16. jouell

    File integrity checker Suggestions

    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...
  17. jouell

    Efficient Bash Script Tip for Large Files?

    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
  18. jouell

    Efficient Bash Script Tip for Large Files?

    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...
  19. jouell

    Excel auto-import 4 files into a worksheet with variable name?

    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
  20. jouell

    Excel auto-import 4 files into a worksheet with variable name?

    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"...

Part and Inventory Search

Back
Top