![]() |
|
|
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 |
| command terminated abnormally | tkbharani | UNIX for Advanced & Expert Users | 0 | 08-02-2007 04:36 AM |
| how to differentiate system call from library call | muru | UNIX for Advanced & Expert Users | 2 | 07-20-2007 12:20 AM |
| start time of a terminated process | k_chaaya | UNIX for Advanced & Expert Users | 2 | 09-04-2006 01:57 AM |
| Process got terminated automatically | Elango | AIX | 4 | 01-02-2006 11:37 PM |
| How to supress a "Killed" message when a process is terminated? | kenwolff | UNIX for Advanced & Expert Users | 2 | 03-22-2004 11:17 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello people,
Need help !!! What am I doing wrong here ? I am writing a function to recursively list the files under a folder and it's sub-folders. Problem is once it list the files under the innermost folder, it terminates. What do I need to do so that it returns and list files under the other folders under the topmost folder. Below please find the method declaration: ############################################ listfiles() ############################################ { dir=$1 echo "Listing files under folder $dir" files=`ls -1 $dir` for file in `echo $files` do if [ -d $dir/$file ]; then #recursive call listfiles $dir/$file fi echo $dir/$file done } Regards, T. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|