Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.89 KB | None | 0 0
  1. echo '<?xml version="1.0" encoding="utf-8"?><d:multistatus xmlns:d="DAV:"><d:response><d:href>/SN/</d:href><d:propstat><d:status>HTTP/1.1 200 OK</d:status><d:prop><d:quota-used-bytes>21496748972</d:quota-used-bytes><d:quota-available-bytes>23600407636</d:quota-available-bytes></d:prop></d:propstat></d:response></d:multistatus>' | sed -r 's/>/>\n/g'| sed -r 's/([^<]+)(<.+)/\1\n\2/'| awk '$0~/<[^\/?].*|^[^<]/{r++}{f=r;while(f>1){printf "\t"; f--};printf $0"\n"} $0~/^[^<]|<\/.*/{r--}'
  2.  
  3. <?xml version="1.0" encoding="utf-8"?>
  4. <d:multistatus xmlns:d="DAV:">
  5.     <d:response>
  6.         <d:href>
  7.             /SN/
  8.         </d:href>
  9.         <d:propstat>
  10.             <d:status>
  11.                 HTTP/1.1 200 OK
  12.             </d:status>
  13.             <d:prop>
  14.                 <d:quota-used-bytes>
  15.                     21496748972
  16.                 </d:quota-used-bytes>
  17.                 <d:quota-available-bytes>
  18.                     23600407636
  19.                 </d:quota-available-bytes>
  20.             </d:prop>
  21.         </d:propstat>
  22.     </d:response>
  23. </d:multistatus>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement