![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 09:12 PM |
| Sed-- command help required | pssandeep | UNIX for Dummies Questions & Answers | 6 | 03-18-2008 10:43 AM |
| Help required using cut command | mahalakshmi | Shell Programming and Scripting | 4 | 03-18-2008 06:36 AM |
| Help required on AWK command | udiptya | UNIX for Dummies Questions & Answers | 13 | 01-22-2008 08:43 AM |
| Help required for cat command | mahalakshmi | Shell Programming and Scripting | 7 | 11-23-2006 06:20 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help Required regarding wc command
Hi guys,
I want to find the number of records in a particular file and store that value in any other variable. I am trying this below command but it is not working and giving me an error "Uninary Operator Expected". say I have taken a variable name 'count' in which I have to store the no. of records in a file. count= wc -l <file name> can u guys pls help me out...how i can store a no. of records in a variable |
|
||||
|
I also prefer this approach. For reference, surrounding the statement in parenthesis actually creates a sub-shell (another process). Putting the $ in front of it lets you use the result as a value.
|
|
||||
|
Hi,
I want to store the count for a number of occurrences of a string (Ex: Sample.test.test1) in a variable from a file. For the above string format, please tell me how to find it. Also, I have one more question. I want to count the number of occurrences of a sentence in file and this count needs to be stored in a variable. Anyone, please help in solving the above two issues ASAP. Regards, Prasanna |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|