![]() |
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 |
| 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 |
| keyword searching of documents | Miles | OS X (Apple) | 1 | 02-25-2008 06:38 PM |
| grep/cat/more -- search in a txt file and display content from a specific "keyword" | I-1 | UNIX for Dummies Questions & Answers | 4 | 02-21-2007 04:57 AM |
| Far Keyword | svh | High Level Programming | 2 | 02-08-2006 12:16 AM |
| Keyword in perl | sarwan | Shell Programming and Scripting | 1 | 01-17-2006 04:35 AM |
| use loop to search | whatisthis | Shell Programming and Scripting | 9 | 09-23-2004 11:10 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
how to search a keyword within a file using a for loop
hi guys i have a problem here, im trying to stablish a relationship between a text file and an input user for example the script is going to prompt the user for some football team and what the script is going to do is return the colums in which that input is located so far this is what i have
#!/bin/bash echo -n "Enter Team: " read team for line in `cut -f2 -d: nhl_data | grep "$team"` do echo $line done | awk -F: '{printf "%s\n", any assistance or suggestionswil be greatly appreciated thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|