The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Help with arithmetic operation
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
Help with arithmetic operation
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
09-20-2007
emjayshaikh
Registered User
Join Date: Sep 2007
Posts: 2
i used
perl
to solve the problem i had. thanks.
#!/usr/bin/
perl
$n = `egrep -n "string" filename | egrep -o "[[:digit:]]{1,}" |
sed
q`;
$m = `egrep -n "string" filename | egrep -o "[[:digit:]]{1,}" |
sed
q`;
$c= $m - $n;
print $c
emjayshaikh
View Public Profile
Find all posts by emjayshaikh