![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Difference between writing Unix Shell script and AIX Shell Scripts | haroonec | AIX | 0 | 04-11-2006 11:27 PM |
| Need help for writing shell script | deepa20 | Shell Programming and Scripting | 3 | 02-01-2006 10:23 AM |
| Need Help Writing Shell Script***please | KristenT | Shell Programming and Scripting | 7 | 01-31-2006 03:00 PM |
| Writing a shell Script | Chin | UNIX for Dummies Questions & Answers | 1 | 06-03-2005 01:32 PM |
| Need help writing simple script | tamdoankc | UNIX for Dummies Questions & Answers | 1 | 08-08-2001 04:48 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
HELP! writing simple shell script
how would i write a shell script to show the number of lines in which int variable appears in a c++ program.
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
weeelll
Code:
grep -cw int infile probably better is something like: Code:
tr -cs "[:alpha:]" "[\n*]" < infile | grep -cw int |
|
#3
|
|||
|
|||
|
thanks
but how would i do this using cut or awk methods is it possbile and having a output similar to this x, number of apperances = y, number of apperances = |
|
#4
|
|||
|
|||
|
Quote:
Code:
for W in int float char; do echo $W; egrep "\b$W\b" import.php | wc -l; done ShawnMilo |
|||
| Google The UNIX and Linux Forums |