![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| for loop problem | mdap | Shell Programming and Scripting | 3 | 08-16-2008 01:27 PM |
| Loop Problem | namishtiwari | UNIX for Dummies Questions & Answers | 4 | 07-15-2008 11:01 AM |
| awk and loop problem | invinzin21 | Shell Programming and Scripting | 3 | 02-04-2008 09:54 PM |
| loop Problem | dhananjaysk | Shell Programming and Scripting | 3 | 03-31-2006 01:05 PM |
| problem with while loop | mridula | High Level Programming | 1 | 12-11-2005 11:44 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi ALL
I am greping some thing from a file,some thing is "/var/www/html" /var/www"/example" and so on its showing like this when u use echo.i want to pass each one of them in a loop for processing.Like start with /var/www/html then 2nd and so one But that not working any iead how i give one by one value. My code docroot=$(grep -H DocumentRoot /etc/httpd/conf.d/*.conf | awk -F' ' '{ print $3 }'| sort -u | uniq) doccount=$(grep -H DocumentRoot /etc/httpd/conf.d/*.conf | awk -F' ' '{ print $3 }'| sort -u | uniq | wc -l) for (( i=0; i <= $doccount; ++i )) do confd="$docroot\n" echo $confd find $confd -type d -perm /o=w | while read DIR do do some thing done ## while done done ##for done |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|