![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with GREP. | syndex | Shell Programming and Scripting | 2 | 07-11-2007 01:44 PM |
| grep problem | asal_email2 | UNIX for Dummies Questions & Answers | 4 | 06-22-2005 08:49 PM |
| grep problem | svennie | UNIX for Dummies Questions & Answers | 5 | 11-08-2004 04:29 AM |
| Grep Problem | lesstjm | Shell Programming and Scripting | 2 | 10-27-2004 10:13 AM |
| Grep problem | odogbolu98 | Shell Programming and Scripting | 3 | 02-18-2003 03:53 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Grep problem
Hi there, this is a very simple question.
When I do grep -c "PWD" filename, I get 5. This means the filename contains 5 lines of "PWD" occurence. I tried to assign to a variable. int= grep -c "PWD" filename When I typed echo $int The output: 5 [unix..] I get an empty line space. Now I cannot do any arithmetic operations because $int will always be 0 rather than 5. How can I solve this problem? Last edited by felixwhoals; 12-17-2007 at 07:26 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|