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> &lt;<a href="mailto:tmz@pobox.com">tmz@pobox.com</a>&gt; 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>&gt; I have a command that I am trying to read a particular amount of<br>&gt; lines with<br>&gt;<br>&gt; wc -l somefile | awk &#39;{print $1}&#39;<br>&gt;<br>&gt; when it givs the number of lines, I am trying to find out how to use
<br>&gt; that number in an addition problem. Can someone help me with that?<br><br>lines=$(wc -l somefile | awk &#39;{print $1}&#39;)<br>res=$(($lines + 42))<br><br>That&#39;s bash specific, so depending on how portable you want the script
<br>to be, you&#39;d need to do things slightly differently.&nbsp;&nbsp;There are a ton<br>of ways you could do something like this.&nbsp;&nbsp;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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OpenPGP -&gt; 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>&nbsp;&nbsp;&nbsp;&nbsp;-- 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.