G2A Many GEOs
SHARE
TWEET

documentinfo

a guest Feb 19th, 2012 174 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #!/bin/bash
  3. # documentinfo, gives document info about a LibreOffice document.
  4. # Created: 2012-02-19
  5. #
  6. # uses: xml, from http://xmlstar.sourceforge.net/
  7. #
  8.  
  9. if [ ! -e $1 ] || [[ "$1" == "" ]]; then
  10.         echo "Usage: `basename $01` <filename>"
  11.         exit 1
  12. fi
  13.  
  14. if [ -e "meta.xml" ]; then
  15.         echo "Sorry, this cannot be done because some 'meta.xml' already exists"
  16. else
  17.         # extract 'meta.xml' from the inputfile
  18.         unzip -qo $1 meta.xml
  19.  
  20.         for f in `xml el meta.xml`;
  21.         do
  22.                 n=${f/*:}
  23.                 if [[ ! "$n" =~ "meta" ]]; then
  24.                         w=`xml sel -t -v "$f" meta.xml`
  25.                         echo "$n: $w"
  26.                 fi
  27.         done
  28.         rm meta.xml
  29. fi
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top