Replace where the filename goes with $1<br><br>You should probably also check that a filename has been specified (by checking that there&#39;s an argument), but I forget how.&nbsp; If you want to get fancy, once you find out how many args there are, you could have it loop through and do it for each specified arg, and then you could use ./email-
script.sh foo bar baz and it&#39;d check files foo, bar, and baz<br><br><div class="gmail_quote">On Dec 3, 2007 5:54 PM, Zach &lt;<a href="mailto:netrek@gmail.com">netrek@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I have a bash script I use to parse out email addresses from log<br>files, it doesn&#39;t work 100% but is good enough to seperate out most of<br>the wheat from the chaf! The problem is it is hardcoded to use one
<br>filename at a time so I must keep editing the file, changing the<br>filename, saving script, running it, etc. Anyone know how I can make<br>this script work on any logfile so I can do: email-script.sh foo<br><br>email-script.sh
:<br><br>grep @ /tmp/trekmsglog | grep -v @$ | grep -v \( | grep -vi bomb |<br>grep -v \! | grep -v ++ | grep -v crippled | grep -v &quot;has no gas&quot; | grep -v 4.4.<br>0.4 | grep -vi &quot;clue game&quot; | grep -v &quot; @$&quot; | grep -v Pick | grep -v Carrying | m
<br>ore<br><font color="#888888"><br>Zach<br>_______________________________________________<br>wplug mailing list<br><a href="mailto:wplug@wplug.org">wplug@wplug.org</a><br><a href="http://www.wplug.org/mailman/listinfo/wplug" target="_blank">
http://www.wplug.org/mailman/listinfo/wplug</a><br></font></blockquote></div><br><br clear="all"><br>-- <br>Mackenzie Morgan<br>Linux User #432169<br>ACM Member #3445683<br><a href="http://ubuntulinuxtipstricks.blogspot.com">
http://ubuntulinuxtipstricks.blogspot.com</a> &lt;-my blog of Ubuntu stuff<br>apt-get moo