This is my input file
/home/edwprod/dnp >ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//|---/g' -e 's/---|/ |/g' | grep -v "^\." 2>/dev/null
|---archive
|---bin
| |---full_refresh
| |---to_be_deleted
|---in_dir
|---landing
| |---archive
|---log
|---tmp
/home/edwprod/dnp >
|---dat_profile_backup
|---mis
| |---export
| | |---home
| | | |---dss1user
| | | | |---audit
| | | | |---backup
| | | | |---bin
| | | | | |---To_b_deleted
| | | | | |---to_be_deleted
| | | | |---config
| | | | |---error
| | | | |---logs
| | | | |---plsql
| |---landing_pad
| | |---5.8.7
| | | |---bin
| | | |---lib
| | | | |---5.8.7
| | | | | |---Attribute
| | | | | | |---Handlers
| | | | | | | |---demo
| | | | | |---B
| | | | | |---CGI
| | | | | | |---eg
| | | | | |---CPAN
| | | | | |---Carp
| | | | | |---Class
| | | | | | |---ISA
| | | | | |---DBM_Filter
| | | | | |---Devel
| | | | | |---Digest
| | | | | |---Encode
| | | | | | |---CN
| | | | | | |---JP
| | | | | | |---KR
| | | | | | |---MIME
| | | | | | |---Unicode
| | | | | |---Exporter
| | | | | |---ExtUtils
| | | | | | |---Command
| | | | | | |---Constant
| | | | | | |---Liblist
| | | | | | |---MakeMaker
| | | | | |---File
| | | | | | |---Spec
| | | | | |---Filter
| | | | | | |---Simple
| | | | | |---Getopt
| | | | | | |---Long
| | | | | |---Hash
| | | | | |---I18N
| | | | | | |---LangTags
| | | | | |---IO
| | | | | | |---Socket
| | | | | |---IPC
| | | | | |---List
| | | | | |---Locale
| | | | | | |---Codes
| | | | | | |---Maketext
| | | | | |---Math
| | | | | | |---BigFloat
| | | | | | |---BigInt
| | | | | |---Memoize
| | | | | |---NEXT
| | | | | |---Net
| | | | | | |---FTP
| | | | | | |---Ping
| | | | | | |---demos
| | | | | |---PA-RISC2.0
| | | | | | |---B
| | | | | | |---CORE
| | | | | | |---Data
| | | | | | |---Devel
| | | | | | |---Digest
| | | | | | |---Encode
| | | | | | |---File
| | | | | | |---Filter
| | | | | | | |---Util
| | | | | | |---I18N
| | | | | | |---IO
| | | | | | |---IPC
| | | | | | |---MIME
| | | | | | |---PerlIO
| | | | | | |---Sys
| | | | | | |---Time
| | | | | | |---Unicode
| | | | | | |---XS
| | | | | | |---auto
| | | | | | | |---B
| | | | | | | | |---C
| | | | | | | |---ByteLoader
| | | | | | | |---Cwd
| | | | | | | |---Data
| | | | | | | | |---Dumper
| | | | | | | |---Devel
| | | | | | | | |---DProf
| | | | | | | | |---PPPort
| | | | | | | | |---Peek
| | | | | | | |---Digest
| | | | | | | | |---MD5
| | | | | | | |---DynaLoader
| | | | | | | |---Encode
| | | | | | | | |---Byte
| | | | | | | | |---CN
| | | | | | | | |---EBCDIC
| | | | | | | | |---JP
| | | | | | | | |---KR
| | | | | | | | |---Symbol
| | | | | | | | |---TW
| | | | | | | | |---Unicode
| | | | | | | |---Fcntl
| | | | | | | |---File
| | | | | | | | |---Glob
| | | | | | | |---Filter
| | | | | | | | |---Util
| | | | | | | | | |---Call
| | | | | | | |---I18N
| | | | | | | | |---Langinfo
| | | | | | | |---IO
| | | | | | | |---IPC
| | | | | | | | |---SysV
| | | | | | | |---List
| | | | | | | | |---Util
| | | | | | | |---MIME
| | | | | | | | |---Base64
| | | | | | | |---NDBM_File
| | | | | | | |---ODBM_File
| | | | | | | |---Opcode
| | | | | | | |---POSIX
| | | | | | | |---PerlIO
| | | | | | | | |---encoding
| | | | | | | | |---scalar
| | | | | | | | |---via
| | | | | | | |---SDBM_File
| | | | | | | |---Socket
| | | | | | | |---Storable
| | | | | | | |---Sys
| | | | | | | | |---Hostname
| | | | | | | | |---Syslog
| | | | | | | |---Time
| | | | | | | | |---HiRes
| | | | | | | |---Unicode
| | | | | | | | |---Normalize
| | | | | | | |---XS
| | | | | | | | |---APItest
| | | | | | | | |---Typemap
| | | | | | | |---attrs
| | | | | | | |---re
| | | | | | | |---sdbm
| | | | | | | |---threads
| | | | | | | | |---shared
| | | | | | |---threads
| | | | | |---PA-RISC2.0-thread-multi
| | | | | | |---B
| | | | | | |---CORE
| | | | | | |---Data
| | | | | | |---Devel
| | | | | | |---Digest
| | | | | | |---Encode
| | | | | | |---File
| | | | | | |---Filter
| | | | | | | |---Util
| | | | | | |---I18N
| | | | | | |---IO
| | | | | | |---IPC
| | | | | | |---MIME
| | | | | | |---PerlIO
| | | | | | |---Sys
| | | | | | |---Time
| | | | | | |---Unicode
| | | | | | |---XS
| | | | | | |---auto
| | | | | | | |---B
| | | | | | | | |---C
| | | | | | | |---ByteLoader
| | | | | | | |---Cwd
| | | | | | | |---Data
| | | | | | | | |---Dumper
| | | | | | | |---Devel
| | | | | | | | |---DProf
| | | | | | | | |---PPPort
| | | | | | | | |---Peek
| | | | | | | |---Digest
| | | | | | | | |---MD5
| | | | | | | |---DynaLoader
| | | | | | | |---Encode
| | | | | | | | |---Byte
| | | | | | | | |---CN
| | | | | | | | |---EBCDIC
| | | | | | | | |---JP
| | | | | | | | |---KR
| | | | | | | | |---Symbol
| | | | | | | | |---TW
| | | | | | | | |---Unicode
| | | | | | | |---Fcntl
| | | | | | | |---File
| | | | | | | | |---Glob
| | | | | | | | |---Temp
| | | | | | | |---Filter
| | | | | | | | |---Util
| | | | | | | | | |---Call
| | | | | | | |---I18N
| | | | | | | | |---Langinfo
| | | | | | | |---IO
| | | | | | | |---IPC
| | | | | | | | |---SysV
| | | | | | | |---List
| | | | | | | | |---Util
| | | | | | | |---MIME
| | | | | | | | |---Base64
| | | | | | | |---NDBM_File
| | | | | | | |---ODBM_File
| | | | | | | |---Opcode
| | | | | | | |---POSIX
| | | | | | | |---PerlIO
| | | | | | | | |---encoding
| | | | | | | | |---scalar
| | | | | | | | |---via
| | | | | | | |---SDBM_File
| | | | | | | |---Socket
| | | | | | | |---Storable
| | | | | | | |---Sys
| | | | | | | | |---Hostname
| | | | | | | | |---Syslog
| | | | | | | |---Time
| | | | | | | | |---HiRes
| | | | | | | |---Unicode
| | | | | | | | |---Normalize
| | | | | | | |---XS
| | | | | | | | |---APItest
| | | | | | | | |---Typemap
| | | | | | | |---attrs
| | | | | | | |---re
| | | | | | | |---sdbm
| | | | | | | |---threads
| | | | | | | | |---shared
| | | | | | |---threads
| | | | | |---PA-RISC2.0-thread-multi-LP64
| | | | | | |---B
| | | | | | |---CORE
| | | | | | |---Data
| | | | | | |---Devel
| | | | | | |---Digest
| | | | | | |---Encode
| | | | | | |---File
| | | | | | |---Filter
| | | | | | | |---Util
| | | | | | |---I18N
| | | | | | |---IO
| | | | | | |---IPC
| | | | | | |---MIME
| | | | | | |---PerlIO
| | | | | | |---Sys
| | | | | | |---Time
| | | | | | |---Unicode
| | | | | | |---XS
| | | | | | |---auto
| | | | | | | |---B
| | | | | | | | |---C
| | | | | | | |---ByteLoader
| | | | | | | |---Cwd
| | | | | | | |---Data
| | | | | | | | |---Dumper
| | | | | | | |---Devel
| | | | | | | | |---DProf
| | | | | | | | |---PPPort
| | | | | | | | |---Peek
| | | | | | | |---Digest
| | | | | | | | |---MD5
| | | | | | | |---DynaLoader
| | | | | | | |---Encode
| | | | | | | | |---Byte
| | | | | | | | |---CN
| | | | | | | | |---EBCDIC
| | | | | | | | |---JP
| | | | | | | | |---KR
| | | | | | | | |---Symbol
| | | | | | | | |---TW
| | | | | | | | |---Unicode
| | | | | | | |---Fcntl
| | | | | | | |---File
| | | | | | | | |---Glob
| | | | | | | | |---Temp
| | | | | | | |---Filter
| | | | | | | | |---Util
| | | | | | | | | |---Call
| | | | | | | |---I18N
| | | | | | | | |---Langinfo
| | | | | | | |---IO
| | | | | | | |---IPC
| | | | | | | | |---SysV
| | | | | | | |---List
| | | | | | | | |---Util
| | | | | | | |---MIME
| | | | | | | | |---Base64
| | | | | | | |---NDBM_File
| | | | | | | |---ODBM_File
| | | | | | | |---Opcode
| | | | | | | |---POSIX
| | | | | | | |---PerlIO
| | | | | | | | |---encoding
| | | | | | | | |---scalar
| | | | | | | | |---via
| | | | | | | |---SDBM_File
| | | | | | | |---Socket
| | | | | | | |---Storable
| | | | | | | |---Sys
| | | | | | | | |---Hostname
| | | | | | | | |---Syslog
| | | | | | | |---Time
| | | | | | | | |---HiRes
| | | | | | | |---Unicode
| | | | | | | | |---Normalize
| | | | | | | |---XS
| | | | | | | | |---APItest
| | | | | | | | |---Typemap
| | | | | | | |---attrs
| | | | | | | |---re
| | | | | | | |---sdbm
| | | | | | | |---threads
| | | | | | | | |---shared
| | | | | | |---threads
| | | | | |---PerlIO
| | | | | | |---via
| | | | | |---Pod
| | | | | | |---Perldoc
| | | | | | |---Text
| | | | | |---Scalar
| | | | | |---Search
| | | | | |---Switch
| | | | | |---Term
| | | | | | |---ANSIColor
| | | | | |---Test
| | | | | | |---Harness
| | | | | | |---Simple
| | | | | |---Text
| | | | | | |---Balanced
| | | | | | |---TabsWrap
| | | | | |---Thread
| | | | | |---Tie
| | | | | |---Time
| | | | | |---Unicode
| | | | | | |---Collate
| | | | | |---User
| | | | | |---auto
| | | | | | |---POSIX
| | | | | | | |---SigAction
| | | | | |---pod
| | | | | |---unicore
| | | | | | |---To
| | | | | | |---lib
| | | | | | | |---bc
| | | | | | | |---ccc
| | | | | | | |---dt
| | | | | | | |---ea
| | | | | | | |---gc_sc
| | | | | | | |---hst
| | | | | | | |---jt
| | | | | | | |---lb
| | | | | | | |---nt
| | | | | |---warnings
| | | | |---site_perl
| | | | | |---5.8.7
| | | | | | |---Bundle
| | | | | | |---Carp
| | | | | | |---Compress
| | | | | | |---Devel
| | | | | | | |---Symdump
| | | | | | |---File
| | | | | | |---HTML
| | | | | | |---HTTP
| | | | | | | |---Cookies
| | | | | | | |---Headers
| | | | | | | |---Request
| | | | | | |---IO
| | | | | | | |---Compress
| | | | | | | | |---Adapter
| | | | | | | | |---Base
| | | | | | | | |---Gzip
| | | | | | | | |---Zip
| | | | | | | | |---Zlib
| | | | | | | |---Uncompress
| | | | | | | | |---Adapter
| | | | | | |---LWP
| | | | | | | |---Authen
| | | | | | | |---Protocol
| | | | | | |---MIME
| | | | | | |---Net
| | | | | | | |---HTTP
| | | | | | |---OLE
| | | | | | |---PA-RISC2.0
| | | | | | | |---Bundle
| | | | | | | |---DBD
| | | | | | | | |---Gofer
| | | | | | | | | |---Policy
| | | | | | | | | |---Transport
| | | | | | | |---DBI
| | | | | | | | |---Const
| | | | | | | | | |---GetInfo
| | | | | | | | |---DBD
| | | | | | | | |---Gofer
| | | | | | | | | |---Transport
| | | | | | | | |---ProfileDumper
| | | | | | | | |---SQL
| | | | | | | | |---Util
| | | | | | | |---Win32
| | | | | | | |---auto
| | | | | | | | |---DBI
| | | | | | |---PA-RISC2.0-thread-multi
| | | | | | | |---Bit
| | | | | | | | |---Vector
| | | | | | | |---Bundle
| | | | | | | |---Compress
| | | | | | | | |---Raw
| | | | | | | |---DBD
| | | | | | | | |---Gofer
| | | | | | | | | |---Policy
| | | | | | | | | |---Transport
| | | | | | | | |---Oracle
| | | | | | | |---DBI
| | | | | | | | |---Const
| | | | | | | | | |---GetInfo
| | | | | | | | |---DBD
| | | | | | | | |---Gofer
| | | | | | | | | |---Transport
| | | | | | | | |---ProfileDumper
| | | | | | | | |---SQL
| | | | | | | | |---Util
| | | | | | | |---Date
| | | | | | | | |---Calc
| | | | | | | | |---Calendar
| | | | | | | |---HTML
| | | | | | | |---Win32
| | | | | | | |---auto
| | | | | | | | |---Bit
| | | | | | | | | |---Vector
| | | | | | | | |---Carp
| | | | | | | | | |---Clan
| | | | | | | | |---Compress
| | | | | | | | | |---Raw
| | | | | | | | | | |---Zlib
| | | | | | | | | |---Zlib
| | | | | | | | |---DBD
| | | | | | | | | |---Oracle
| | | | | | | | |---DBI
| | | | | | | | |---Date
| | | | | | | | | |---Calc
| | | | | | | | |---Devel
| | | | | | | | | |---StackTrace
| | | | | | | | | |---Symdump
| | | | | | | | |---HTML
| | | | | | | | | |---Parser
| | | | | | | | | |---Tagset
| | | | | | | | |---IO
| | | | | | | | | |---Compress
| | | | | | | | | | |---Base
| | | | | | | | | | |---Zlib
| | | | | | | | |---LWP
| | | | | | | | |---MIME
| | | | | | | | | |---Lite
| | | | | | | | |---OLE
| | | | | | | | | |---Storage_Lite
| | | | | | | | |---Parse
| | | | | | | | | |---RecDescent
| | | | | | | | |---Spreadsheet
| | | | | | | | | |---ParseExcel
| | | | | | | | | |---WriteExcel
| | | | | | | | |---Test
| | | | | | | | | |---Exception
| | | | | | | | |---URI
| | | | | | | | |---XML
| | | | | | | | | |---NamespaceSupport
| | | | | | |---PA-RISC2.0-thread-multi-LP64
| | | | | | | |---Bit
| | | | | | | | |---Vector
| | | | | | | |---Bundle
| | | | | | | |---Compress
| | | | | | | | |---Raw
| | | | | | | |---DBD
| | | | | | | | |---Gofer
| | | | | | | | | |---Policy
| | | | | | | | | |---Transport
| | | | | | | | |---Oracle
| | | | | | | |---DBI
| | | | | | | | |---Const
| | | | | | | | | |---GetInfo
| | | | | | | | |---DBD
| | | | | | | | |---Gofer
| | | | | | | | | |---Transport
| | | | | | | | |---ProfileDumper
| | | | | | | | |---SQL
| | | | | | | | |---Util
| | | | | | | |---Date
| | | | | | | | |---Calc
| | | | | | | | |---Calendar
| | | | | | | |---HTML
| | | | | | | |---Win32
| | | | | | | |---XML
| | | | | | | | |---Parser
| | | | | | | | | |---Encodings
| | | | | | | | | |---Style
| | | | | | | |---auto
| | | | | | | | |---Bit
| | | | | | | | | |---Vector
| | | | | | | | |---Compress
| | | | | | | | | |---Raw
| | | | | | | | | | |---Zlib
| | | | | | | | | |---Zlib
| | | | | | | | |---DBD
| | | | | | | | | |---Oracle
| | | | | | | | |---DBI
| | | | | | | | |---Date
| | | | | | | | | |---Calc
| | | | | | | | |---HTML
| | | | | | | | | |---Parser
| | | | | | | | |---IO
| | | | | | | | | |---Stringy
| | | | | | | | |---LWP
| | | | | | | | |---MIME
| | | | | | | | | |---Lite
| | | | | | | | |---OLE
| | | | | | | | | |---Storage_Lite
| | | | | | | | |---Parse
| | | | | | | | | |---RecDescent
| | | | | | | | |---Spreadsheet
| | | | | | | | | |---ParseExcel
| | | | | | | | | |---WriteExcel
| | | | | | | | |---URI
| | | | | | | | |---XML
| | | | | | | | | |---NamespaceSupport
| | | | | | | | | |---Parser
| | | | | | | | | | |---Expat
| | | | | | | | | |---SAX
| | | | | | | | | | |---Expat
| | | | | | |---Parse
| | | | | | |---Spreadsheet
| | | | | | | |---ParseExcel
| | | | | | | |---WriteExcel
| | | | | | |---Test
| | | | | | |---URI
| | | | | | | |---file
| | | | | | | |---urn
| | | | | | |---WWW
| | | | | | | |---RobotRules
| | | | | | |---XML
| | | | | | | |---SAX
| | | | | | | | |---PurePerl
| | | | | | | | | |---Reader
| | | | | | |---auto
| | | | | | | |---Compress
| | | | | | | | |---Zlib
| | | |---man
| | | | |---man1
| | | | |---man3
| | |---E2E_states
| | |---bos1
| | |---bos2
| | | |---BKP
| | | |---bkp
| | |---bos3
| | | |---BKP
| | | |---bkp
| | |---bos4
| | | |---BKP
| | | | |---bkp
| | |---bos_cease
| | | |---bos_cease_1
| | | | |---archive
| | | | |---log
| | | | |---rejected
| | | |---bos_cease_2
| | | | |---archive
| | | | |---log
| | | | |---rejected
| | | |---bos_cease_3
| | | | |---archive
| | | | |---log
| | | | |---rejected
| | | |---bos_cease_4
| | | | |---archive
| | | | |---log
| | | | |---rejected
| | | |---bos_xsd
| | | |---log
| | |---bos_log
| | |---c2b
| | | |---delivered
| | | |---loaded
| | | |---log
| | |---c2b_vas_orders
| | |---cew
| | | |---housekeep
| | | |---log
| | | |---scripts
| | | |---sent
| | | |---spool
| | |---css
| | | |---err
| | | |---loaded
| | | |---log
| | | |---rej
| | | |---tsv
| | |---css_orders
| | |---domain
| | |---exch
| | | |---delivered
| | | |---loaded
| | | |---log
| | | |---rejected
| | |---finnead
| | |---geneva
| | | |---err
| | | |---loaded
| | | |---log
| | | |---rej
| | | |---txt
| | |---he
| | | |---csv
| | | |---latest
| | | |---log
| | |---lost+found
| | |---munich
| | | |---archive
| | | |---delivered
| | | |---log
| | |---odm_css
| | | |---delivered
| | | |---loaded
| | | |---log
| | |---oracle
| | | |---InstantClient
| | | | |---itanium
| | | | | |---32bit
| | | | | | |---instantclient_10_2
| | | | | | | |---sdk
| | | | | | | | |---demo
| | | | | | | | |---include
| | | | | |---64bit
| | | | | | |---instantclient_10_2
| | | | | | | |---sdk
| | | | | | | | |---demo
| | | | | | | | |---include
| | | | |---pa-risc
| | | | | |---32bit
| | | | | | |---instantclient_10_2
| | | | | | | |---sdk
| | | | | | | | |---demo
| | | | | | | | |---include
| | | | | |---64bit
| | | | | | |---instantclient_10_2
| | | | | | | |---sdk
| | | | | | | | |---demo
| | | | | | | | |---include
| | |---orca
| | | |---affinity
| | | | |---delivered
| | | | |---loaded
| | | | |---rejected
| | | |---brio
| | | | |---sent
| | | |---log
| | |---parb
| | |---scheduler
| | | |---cron_backup
| | | |---log
| | |---sdp
| | | |---delivered
| | | |---loaded
| | | |---log
| | | |---rejected
| | | |---xsd
| | |---vos
| | | |---log
How to build for this?
I want to read this file using SED
or AWK
and convert to
mkdir -p /home/edwprod/dnp/{archive,bin/{full_refresh,to_be_deleted},in_dir,landing/archive,log,tmp}
Could you please help / guide on this?