![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need a sed command that uses variable | ketkeep | Shell Programming and Scripting | 2 | 06-07-2008 10:36 AM |
| Question On Command in Variable | scotbuff | Shell Programming and Scripting | 4 | 10-29-2007 04:23 PM |
| How to Store command O/P to a variable... | smartbuddy | UNIX for Dummies Questions & Answers | 7 | 08-24-2007 04:49 AM |
| set variable command | ammu | Shell Programming and Scripting | 1 | 05-24-2007 06:45 AM |
| Export command giving Variable Name vs the Value set for the Variable | ParNone | UNIX for Dummies Questions & Answers | 2 | 04-03-2006 08:43 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
How to include a variable between apostrophes within a command
Hi.
I'm trying to find some words within my directory and created a text file containing them which is read by my shell script: Code:
#!/bin/bash
var=`cat words.txt`
for i in $var; do
echo $i
find -type f -print0 | xargs -r0 grep -F '$i'
done
Thank you very much. |
| Forum Sponsor | ||
|
|