0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

documentation > フォルダのtree構造作成 > yone098@githubさんの手法 + アルファ

Last updated at Posted at 2019-05-14
動作環境
Windows 10 Pro (64bit) バージョン 1809 (October 2018 Update)
秀丸エディタ Version 8.79
SmartGit 18.2.3
Git for Windows (git version 2.19.1.windows.1)

tree構造の取得

情報感謝です。

実行例

$ find . | sort | sed '1d;s/^\.//;s/\/\([^/]*\)$/|--\1/;s/\/[^/|]*/|  /g'
|--dirA
|  |--dirA-1
|  |--dirA-2
|--dirB
|  |--dirB-1
|  |--dirB-2
|  |  |--You've_got_it.txt
|  |--dirB-3
|--dirC

tree構造の編集

置換元: | (3文字)
置換先* (3文字)

秀丸エディタを使いました。

結果

|--dirA
   |--dirA-1
   |--dirA-2
|--dirB
   |--dirB-1
   |--dirB-2
      |--You've_got_it.txt
   |--dirB-3
|--dirC

自分はこちらのほうが好みです。

さらに置換をすると、よりきれいになるかもしれませんが。
(過剰かもしれません)

  • 例: |--┗--
┗--dirA
   ┗--dirA-1
   ┗--dirA-2
┗--dirB
   ┗--dirB-1
   ┗--dirB-2
      ┗--You've_got_it.txt
   ┗--dirB-3
┗--dirC
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?