What shows when you type
route -n
after running your script?
I have used the following before
#!/bin/bash
$IP="192.168.1.12"
$ROUTE="192.168.1.1"
ifconfig eth0 inet $IP netmask 255.255.255.0
route add default gw $ROUTE
What shows when you type
route -n
after running your script?
I have used the following before
#!/bin/bash
$IP="192.168.1.12"
$ROUTE="192.168.1.1"
ifconfig eth0 inet $IP netmask 255.255.255.0
route add default gw $ROUTE
Hey, I just became a member. This is a nice website.
So my question is what are the difference between OpenBSD and FreeBSD...They both seem to be about the same. Thanks for the help (if i get any).:)
Since I have little experience with both I can only comment based on my experiences and things I know are common knowledge.
FreeBSD is designed to be more user friendly than openbsd, it is also more key towards developers and desktop users.
OpenBSD is much more secure, supposedly the most secure BSD available if not the most secure operating system in the world, only one vulnerability found in the last 7 years in the default install.
They also both have totally different branches of development which means each will have code and features that the other is missing.
All BSD's come from the same orginial sources but they have all branched off into seperate development trees to support different things and be keyed towards different tasks.
I am sure there is a major BSD geek going to give you a much more detailed answer than that but from my understanding and limited knowledge (I have been running openbsd for a year on 2 servers and freebsd on and off from about 3 years but I haven't ever gone into more detail in learning beyond what I needed to know to do the tasks at hand).
HTH anyway
Ben
sub filter_begin ()
I can't find anywhere in your script where this is being called, therefore it wouldn't do anything.
# Subject check
my($msgSubject);
my($hfile) = "HEADERS";
while(<HEADERS>) {
chomp;
$line = $_;
$idx = index($line, "Subject: ");
if (idx == 0){
$msgSubject = substr($line, 9);
}
}
You are assigning the value "HEADERS" to $hfile, so:
print $hfile;
would print HEADERS.
If you are trying to read the value of a file, I would suggest passing it as an array, and doing:
foreach $line (@file) {
instead of
while(<HEADERS>) {
Either that or open the file in the function:
open(HEADERS,"filename.txt");
while(<HEADERS>) {
Or pass the file handle to the function:
filter_begin("subject", *HEADERS);
sub filter_begin {
my ($blah, $handle) = @_;
while(<$handle>) {
Sorry if this isn't very clear I haven't been awake long.
HTH
Ben