This is a real quickie. How do you find any record in which some of the words begin with a "."?
Here's the answer:
grep '.\.' file.txt.
If you want to loop through more than one file try this:
#!/bin/bash
for file in `ls *.txt`
do
echo "searching $file"
grep '.\.' $file
done
to find all of the records that don't have words starting with a "." try
grep -v '.\.' file.txt
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment