Help with wc and subtraction needed
Lux Zhang
yuanlux at gmail.com
Fri Jul 13 01:05:50 UTC 2007
On 13/07/07, Matthew Benjamin <msbenjamin12 at gmail.com> wrote:
>
> I have a command that I am trying to read a particular amount of lines
> with
>
> wc -l somefile | awk '{print $1}'
if you prefer the comman line, you can do
wc -l somefile | awk -v a=42 '{t=$1+a; print t}'
when it givs the number of lines, I am trying to find out how to use that
> number in an addition problem. Can someone help me with that?
>
>
> --
> mB.
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070713/8aa46832/attachment-0001.htm>
More information about the fedora-list
mailing list