Search Results

Search: Posts Made By: cecco16
7,552
Posted By Yoda
Try this:- for i in `find . -type d` do ...
Try this:-

for i in `find . -type d`
do
cd ${i}/host
cat xxxx.txt |grep "yyyy" >> zzzz.txt
cd -
done
7,552
Posted By Corona688
You are changing into directories and never...
You are changing into directories and never changing back out. folder2 may exist, but it probably doesn't inside folder1! So do cd ../../ at the bottom of the loop to back back out.
37,297
Posted By Neo
Featured Books and Articles by Active Forum Members
The UNIX and Linux Forums have a number of active members that have published books or papers related to shell programming and scripting. You can check out their publications here:

Link Removed
...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 07:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy