chish
1
Hi,
I have such an example(ksh):
name1=Example
directory=/directory1/Example/directory2
match=$(grep -s '$name1' $directory | wc -l)
echo $match
But it replies to me:
0
What I expect from it, is to find $name1 in $directory and produce 1 for me as true, not false.
joeyg
2
1) Example within string /dir/Example/dir2?
or
2) a file called Example inside the directory
anbu23
3
match=$(echo $directory | grep -s "$name1" | wc -l)
chish
4
Thank you it works and that's what I've expected.