Basic equations in bash scripts:
x=15
y=8
sum=$((x+y))
dif=$((x-y))
mod=$((x%y))
prod=$((x*y))
skip to main |
skip to sidebar
Pages
Keep it simple stupid!
Wednesday, March 28, 2012
Tuesday, March 6, 2012
How to search a word in multiple files
1. Search a word in all the files with the .txt extension in current directory.
2. Search a word in all the files in current directory and its subdirectories.
-H = display the name of the file
-r = search recursively trough subdirectories
grep -H "word" *.txt
2. Search a word in all the files in current directory and its subdirectories.
grep -H -r "word" home/directory
-H = display the name of the file
-r = search recursively trough subdirectories
Followers
Fun Box
About Me
Copyright 2010 ECHO-tutorials.blogspot.com . Powered by Blogger
Blogger Templates created by Deluxe Templates Wordpress by thebookish