[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Help with wc and subtraction needed





On 13/07/07, Matthew Benjamin <msbenjamin12 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 redhat com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]