![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing global variable to a function which is called by another function | sars | Shell Programming and Scripting | 4 | 06-30-2008 08:39 AM |
| function help | coolkid | Shell Programming and Scripting | 2 | 05-01-2008 10:47 AM |
| Log function | Ernst | Shell Programming and Scripting | 17 | 03-19-2007 09:31 AM |
| awk with function ?? please, help :( | sabercats | Shell Programming and Scripting | 0 | 03-13-2006 04:52 PM |
| How to convert the "select" function into a "poll" function | rbolante | High Level Programming | 1 | 07-10-2001 07:49 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Function within function (Recurance)
Slight prob with the placement of func in func
Just to list directories within directories The func below will only list the first set of dir after home dir I need it to list below anyother dir within that dir function ListDir (){ for list in $(ls $1) do if [ -d $1/$list ] then echo $list fi done } ListDir $HOME Thanx |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
is it necessary to make function.i mean the same task can be done with find command
Code:
path=/export/home/abc/xyz find $path -type d -print Code:
find /export/abc/yourpath -type d -print |
|
#3
|
|||
|
|||
|
silly me
i used
ListDir $1/$list which looked for dir within dir |
|||
| Google The UNIX and Linux Forums |