Very sweet that work perfect, thanks!<br><br><br><div><span class="gmail_quote">On 7/12/07, <b class="gmail_sendername">Todd Zullinger</b> <<a href="mailto:tmz@pobox.com">tmz@pobox.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Matthew Benjamin wrote:<br>> I have a command that I am trying to read a particular amount of<br>> lines with<br>><br>> wc -l somefile | awk '{print $1}'<br>><br>> when it givs the number of lines, I am trying to find out how to use
<br>> that number in an addition problem. Can someone help me with that?<br><br>lines=$(wc -l somefile | awk '{print $1}')<br>res=$(($lines + 42))<br><br>That's bash specific, so depending on how portable you want the script
<br>to be, you'd need to do things slightly differently.  There are a ton<br>of ways you could do something like this.  Some bash guides might be<br>helpful:<br><br>BASH Programming - Introduction HOW-TO<br><a href="http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html">
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html</a><br><br>Advanced Bash-Scripting Guide<br><a href="http://tldp.org/LDP/abs/html/">http://tldp.org/LDP/abs/html/</a><br><br>--<br>Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: 
<a href="http://www.pobox.com/~tmz/pgp">www.pobox.com/~tmz/pgp</a><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>I advise you to go on living solely to enrage those who are paying<br>your annuities. It is the only pleasure I have left.
<br>    -- Voltaire<br><br><br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list
</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>mB.