Flatten a java project directory structure prepending the path to the file.

Posted by Fork on Stack Overflow See other posts from Stack Overflow or by Fork
Published on 2010-06-10T09:48:40Z Indexed on 2010/06/10 9:52 UTC
Read the original article Hit count: 178

Filed under:
|
|
|

Hi there,

I am trying to write a script (preferably in bash) to flatten a java projet directory structure prepending the path to the file. Example:

| src
  | org
    | apache
      | file2.java
    | file1.java

would result in:

| src
  | org|apache|file2.java
  | org|file1.java

The script should be recursive since the directory could have many subfolders.

© Stack Overflow or respective owner

Related posts about bash

Related posts about scripting