-
Junior Member
Math Calculations - Unix Shell
Can someone tell me how to do the following inside a unix script?
I have a file and can do a wc -l on it....say the count is 123 lines.
#wcl /tmp/file
>123
I would then like to divide this number by 2 to get a decimal number.
# wcl /tmp/file| `expr /tmp/file /2`
Can't find the right expr combo.
Any idea how to accomplish this?
Thx.
Kurt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules