1. Each category has a full set of DOS to format the path name
2. Each front path name to add a prefix -i
3. All content in one line, separated by a space,
CodePudding user response:
A similar approachEcho ` find. -type ` d | sed -e 's//- I/g'
CodePudding user response:
Assuming the specified directory is/root/Ls -r/root/| grep '/' | tr '/', '\ \ | tr' : ' '| sed' s/^/- l/g | tr '\ n' ' '