Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Perl] How to get subdirectory?

Status
Not open for further replies.

maulin sheth

Advanced Member level 2
Advanced Member level 2
Joined
Oct 24, 2010
Messages
502
Helped
90
Reputation
179
Reaction score
90
Trophy points
1,318
Location
Bangalore, India
Visit site
Activity points
4,161
Hello All,

Can any one please help me to how to get the full path of sub directory using perl?
e.g. if directory structure like :

|-- a
| |-- b
| | |-- c
| | | `-- test.tcl
| | |-- d
| | | `-- test.tcl
| | `-- e
| | `-- f
| | `-- test.tcl
| `-- g
| `-- test.tcl

Perl output is :
a/b/c
a/b/d
a/b/e/f
a/g
--
Thanks & Regards,
Maulin Sheth
 

You can use find to check all the sub directories :
find ./* -iname "*" -> Will display each and everything from the parent direcotory

Then you can pipe it to have only folder (-f).

Edit:
You can use tree in terminal (SHELL) just to verify with perl coding.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top