Monday, March 3, 2003 @ 2:33:16 AM Central Standard Time
JJT> One possible solution (untested):
JJT> perl -le 'print"tcp,0.0.0.0/0,$_,192.168.1.100,$_"for28800..29100"'>>config
Thank You for the tip. I have not tested it yet, but I will check it.
This afternoon & evening (prior to seeing this response, thanks again
by the way) I gave myself a crash course in bash script writing.
After several hours I successfully made a script that was able to do
everything I wanted, except I cannot for the life of me figure out how
to send the data going to the screen, to a file. Sounds stupid, but I
tried using >> everywhich way possible.
I read until my eyes bled & strings of code started
coming out of my arse.
I would like the output of this script to be written to a file named
"config1".
Here is the code in question:
#!/bin/bash
BEGINPORT=28800
ENDPORT=29100
while [ "$BEGINPORT" -lt $(($ENDPORT+1)) ]
do
echo "tcp,0.0.0.0/0,$BEGINPORT,192.168.1.100,$BEGINPORT,on"
BEGINPORT=$(($BEGINPORT+1))
done
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
It works great. I don't know where or how to properly use ">>
config1" or if I need to add something else to save it to a file.
I'm really close on this one, and would really appreciate anyones
advice.
JJT> I think you have enough slack already, "Bob". HAIL ERIS!
Yes, I am a Slackware fan. I love it.
Thank You All & Adios,
Robert (aka B_o_B) David Felix De Mars
West Longitude 90' 15' 43"
mailto:chewbaka at toughguy.net
_______________________________________________
Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list